/* assets/style.css */

/* ریست ساده */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  direction: rtl;
  background: #FFF7FA;
  color: #333333;
  font-family: "Vazir", "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, select, textarea, input{
    font-family: "Vazir", "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ساختار کلی اپ */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  display:flex;
  flex-direction: row;
  justify-content: space-around;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #FFE9EC;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  padding: 0.75rem 1rem;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  color: #c2185b;
}

.header-logo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFB6C4, #FFC7D9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo i {
  font-size: 0.9rem;
  color: #ffffff;
}

.app-main {
  flex: 1 0 auto;
  padding: 0.75rem 0.75rem 3.75rem;
}

/* کارت‌ها */

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 0.85rem 0.9rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  margin-bottom: 0.75rem;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #b0003a;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.card-header i {
  font-size: 1rem;
}

.card-body {
  font-size: 0.85rem;
}

/* Greeting Card */

.greeting-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #FFE9EC, #DDEBFF);
}

.greeting-text h2 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  color: #b0003a;
}

.greeting-text p {
  margin: 0;
  font-size: 0.85rem;
  color: #555555;
}

.greeting-icon i {
  font-size: 1.8rem;
  color: #f57c8b;
}

/* پیام روزانه */

.daily-message-card {
  background: linear-gradient(135deg, #FFE9EC, #FFF7FA);
}

/* لیست‌ها */

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.list-item:last-child {
  border-bottom: none;
}

.list-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: #333333;
}

.list-meta {
  font-size: 0.78rem;
  color: #777777;
}

/* Badge */

.badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: #FFE9EC;
  color: #b0003a;
}

/* متن خنثی */

.muted {
  margin: 0;
  font-size: 0.8rem;
  color: #999999;
}

/* بخش‌ها */

.section {
  margin: 0.75rem;
}

/* گرید ساده برای دسکتاپ کوچک */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .app-main {
    max-width: 960px;
    margin: 0 auto;
    padding-bottom: 4rem;
  }

  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* فرم‌ها */

.form-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
  color: #555555;
}

.form-input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 12px;
  border: 1px solid #e0c7d5;
  background: #fff;
  font-size: 0.85rem;
  outline: none;
  transition: border 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  border-color: #f06292;
  box-shadow: 0 0 0 2px rgba(240, 98, 146, 0.15);
}

/* دکمه‌ها */

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
  font-weight: 500;
}

.btn-primary {
  background: linear-gradient(135deg, #FF7CA3, #F06292);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(240, 98, 146, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(240, 98, 146, 0.45);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Alert */

.alert {
  border-radius: 14px;
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.alert-error {
  background: #ffdde5;
  color: #b0003a;
}

/* صفحه ورود */

.login-container {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: #ffffff;
  border-radius: 18px;
  padding: 1.25rem 1.2rem;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
}

.login-title {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  color: #b0003a;
}

.login-subtitle {
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  color: #777777;
}

.login-form {
  margin-top: 0.5rem;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper .password-input {
    padding-left: 40px !important;
    direction: ltr;
    text-align: left;
}

.toggle-password {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #777;
    font-size: 1.1rem;
}

/* ناوبری پایین (Bottom Nav) */

.bottom-nav {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  height: 3.3rem;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-inline: 0.25rem;
  z-index: 20;
}

.bottom-nav-item {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: #888888;
  font-size: 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
}

.bottom-nav-item i {
  font-size: 1rem;
}

/* می‌توانی با کلاس active استایل آیتم فعال را تنظیم کنی */

.bottom-nav-item.active {
  color: #b0003a;
}

.bottom-nav-item.active i {
  color: #f06292;
}

/* modal finance */
.modal-finance {
    background: #fff7fa;
    border-radius: 16px;
    padding: 20px;
}

/* income / expense colors */
.income-text {
    color: #2196F3;
    font-weight: bold;
}

.expense-text {
    color: #E53935;
    font-weight: bold;
}

/* finance summary */
.finance-row {
    display: flex;
    gap: 10px;
}

.finance-box {
    flex: 1;
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.finance-box.income i { color: #2196F3; }
.finance-box.expense i { color: #E53935; }
.finance-box.balance i { color: #6A1B9A; }

/* sorting */
.sort-box {
    margin-bottom: 10px;
}

.sort-box label {
    font-size: 14px;
    margin-left: 6px;
}

/* ========== فرم‌ها ========== */
form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

form label {
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

/* فیلدهای ورودی */
form input[type="text"],
form input[type="number"],
form input[type="password"],
form textarea,
form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e3d8dd;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    transition: 0.2s;
    outline: none;
}

form input:focus,
form textarea:focus,
form select:focus {
    border-color: #f8a8c3;
    box-shadow: 0 0 0 3px rgba(255, 182, 206, 0.35);
}

/* textarea */
form textarea {
    height: 85px;
    resize: vertical;
}

/* دکمه اصلی */
.btn {
    background: #ff7fa8;
    color: #fff;
    font-weight: 600;
    padding: 12px 14px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    transition: 0.2s;
}

.btn:hover {
    background: #ff6999;
}

/* دکمه ثانویه */
.btn-secondary {
    background: #eee;
    color: #333;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.btn-secondary:hover {
    background: #ddd;
}

/* دکمه کوچک */
.btn-small {
    background: #ff7fa8;
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    border: none;
    font-size: 12px;
    cursor: pointer;
}

/* سِلِکت */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23888' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-position: left 12px center;
    background-repeat: no-repeat;
    padding-left: 32px !important;
}

/* ========== MODAL ها ========== */
.modal {
    overflow-y: auto;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 2000;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 18px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    animation: modalFade 0.25s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalFade {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
}

/* ========== ظاهر جذاب کارت‌ها ========== */

.card h3 {
    margin-bottom: 12px;
    color: #444;
    font-size: 16px;
}

.finance-summary-card {
    background: #ffeef5;
    border: 1px solid #ffd9e7;
}

.list-item {
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-item:hover {
    background: #fff4fa;
}

.list-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.amount {
    font-size: 14px;
}

/* رنگ‌ها */
.income-text { color: #2196F3 !important; font-weight: bold; }
.expense-text { color: #E53935 !important; font-weight: bold; }
