@import url('https://cdn.fontcdn.ir/Font/Persian/Vazirmatn/Vazirmatn.css');

body {
    min-height: 100vh;
    background: repeating-linear-gradient(135deg, #23243a 0 20px, #23243a 20px 40px, #18192a 40px 60px, #18192a 60px 80px);
    color: #fff;
    font-family: Vazir, Tahoma, Arial, sans-serif;
    direction: rtl;
}

.card, .settings__card, .notes-list__card {
    background: rgba(40, 42, 60, 0.95);
    border: 2px solid #fff;
    border-radius: 2rem;
    box-shadow: 0 8px 32px 0 #0004;
    padding: 2rem 1.5rem;
    margin: 2rem auto;
    max-width: 1000px;
    min-width: 600px;
}

.card-title, .settings__title, .notes-list__title {
    color: #ffb347;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2rem;
    text-align: center;
}

.form-label, label {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-align: right;
}

input, select, textarea {
    background: transparent;
    border: 2px solid #fff !important;
    border-radius: 2rem !important;
    color: #fff;
    padding: 0.8rem 1.2rem;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    outline: none;
    box-shadow: none;
    transition: border 0.2s;
    text-align: right;
}
input:focus, select:focus, textarea:focus {
    border-color: #ffb347 !important;
}

::placeholder {
    color: #bbb;
    opacity: 1;
    text-align: right;
}

input::placeholder, .form-control::placeholder {
    color: #bbb !important;
    opacity: 1 !important;
    text-align: right !important;
    font-size: 1.1rem !important;
}

.btn, button {
    border-radius: 2rem !important;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0.7rem 2.5rem;
    margin: 0.2rem 0.3rem;
    transition: background 0.2s, color 0.2s;
}
.btn-save {
    background: #27ae60 !important;
    color: #fff !important;
    border: none !important;
}
.btn-save:hover {
    background: #219150 !important;
    color: #fff !important;
}

.btn-cancel {
    background: #e74c3c !important;
    color: #fff !important;
    border: none !important;
}
.btn-cancel:hover {
    background: #c0392b !important;
    color: #fff !important;
}

.btn-add-page {
    background: #ffb347 !important;
    color: #23243a !important;
    border: none !important;
}
.btn-add-page:hover {
    background: #ff8800 !important;
    color: #fff !important;
}

.btn-outline-warning {
    background: transparent !important;
    color: #ffb347 !important;
    border: 2px solid #ffb347 !important;
}
.btn-outline-warning:hover {
    background: #ffb347 !important;
    color: #23243a !important;
}

.form-check-input:checked {
    background-color: #ffb347 !important;
    border-color: #ffb347 !important;

}

.form-check-label {
    color: #fff;
    font-size: 1rem;

}

.notes-list__table, .settings__list {
    background: rgba(40, 42, 60, 0.95);
    border-radius: 1.5rem;
    border: 5px solid #2c2b2b;
    color: #fff;
    margin: 2rem auto;
    width: 100%;
    overflow: hidden;
}
.notes-list__table th, .notes-list__table td {
    background: transparent;
    color: #fff;
    border-bottom: 1px solid #444;
    padding: 1rem 0.5rem;
    text-align: center;
}
.notes-list__table th {
    color: #ffb347;
    font-weight: bold;
    font-size: 1.1rem;
}
.notes-list__table tr:last-child td {
    border-bottom: none;
}

.settings__item {
    background: transparent;
    border-bottom: 1px solid #444;
    color: #fff;
    padding: 0.7rem 0.5rem;
    border-radius: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.7rem;
}
.settings__item:first-child {
    margin-top: 0.7rem;
}

.main-footer {
    background: transparent;
    color: #fff;
    text-align: center;
    padding: 1.5rem 0 0.5rem 0;
    margin-top: 2rem;
    font-size: 1rem;
}

@media (max-width: 700px) {
    .card, .settings__card, .notes-list__card {
        max-width: 98vw;
        min-width: 0 !important;
        padding: 1.2rem 0.5rem !important;
    }
}

.main-header {
    background: #23272f;
    padding: 1rem 0;
    margin-bottom: 2rem;
}
.main-header__nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
}
.main-header__nav a {
    color: #f1f1f1;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.2s;
}
.main-header__nav a:hover {
    background: #333b4a;
}
.main-content {
    max-width: 500px;
    margin: 0 auto;
    padding: 1.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.settings__form, .note-form__form, .notes-list__filter {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}
.settings__form input[type="text"],
.settings__form input[type="color"],
.note-form__form input,
.note-form__form select,
.notes-list__filter input,
.notes-list__filter select {
    padding: 0.5rem;
    border-radius: 5px;
    border: 1px solid #444;
    background: #23272f;
    color: #f1f1f1;
}
.settings__form button,
.note-form__form button,
.notes-list__filter button,
.notes-list__export {
    background: #ffb347;
    color: #23272f;
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.settings__form button:hover,
.note-form__form button:hover,
.notes-list__filter button:hover,
.notes-list__export:hover {
    background: #ff8800;
    color: #fff;
}
.settings__list, .settings__item {
    list-style: none;
    padding: 0;
    margin: 0;
}
.note-form__stories {
    display: grid;
    gap: 0.5rem;
}
.note-form__story-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.note-form__actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}
.alert, .alert-success, .alert-danger, .alert-warning, .alert-info {
    font-family: 'Vazir', Vazirmatn, Tahoma, sans-serif !important;
    font-size: 1.1rem;
    direction: rtl;
    text-align: center;
}
.alert-success {
    background: #2ecc40;
    color: #fff;
}
.alert-error {
    background: #e74c3c;
    color: #fff;
}
.notes-list__filter {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.notes-list__table {
    width: 100%;
    border-collapse: collapse;
    background: #23272f;
    border-radius: 8px;
    overflow: hidden;
}
.notes-list__table th, .notes-list__table td {
    padding: 0.7rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid #333b4a;
}
.notes-list__table th {
    background: #23272f;
    color: #ffb347;
    font-weight: bold;
}
.notes-list__table tr:last-child td {
    border-bottom: none;
}
.notes-list__export {
    text-align: center;
    text-decoration: none;
    display: inline-block;
}
.note-form__title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #ffb347;
    text-align: right;
    font-weight: bold;
}
.note-form__form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    background: #23272f;
    border-radius: 12px;
    padding: 2rem 1.2rem 1.2rem 1.2rem;
    box-shadow: 0 2px 16px 0 #0002;
}
.note-form__form label {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: #ffb347;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.note-form__form input,
.note-form__form select {
    padding: 0.7rem 0.8rem;
    border-radius: 6px;
    border: 1px solid #444;
    background: #18191a;
    color: #f1f1f1;
    font-size: 1rem;
    margin-top: 0.2rem;
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
}
.note-form__pages {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 0.5rem;
}
.note-form__pages > label {
    color: #ffb347;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}
#pagesContainer {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.note-form__page-row {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    background: #18191a;
    border-radius: 8px;
    padding: 0.5rem 0.5rem;
    box-shadow: 0 1px 6px 0 #0001;
}
.note-form__page-row select,
.note-form__page-row input {
    flex: 1 1 0;
    min-width: 0;
    font-size: 1rem;
}
.note-form__page-row button {
    background: #ffb347;
    color: #23272f;
    border: none;
    border-radius: 5px;
    padding: 0.4rem 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 1rem;
}
.note-form__page-row button:hover {
    background: #ff8800;
    color: #fff;
}
.note-form__actions {
    display: flex;
    flex-direction: row-reverse;
    gap: 1rem;
    align-items: center;
    margin-top: 1.2rem;
    justify-content: flex-end;
}
.note-form__actions button {
    background: #ffb347;
    color: #23272f;
    border: none;
    border-radius: 5px;
    padding: 0.6rem 1.5rem;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.note-form__actions button:hover {
    background: #ff8800;
    color: #fff;
}
.note-form__actions label {
    margin: 0;
    color: #f1f1f1;
    font-size: 1rem;
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
@media (max-width: 600px) {
    .main-content {
        padding: 0.5rem;
        max-width: 100vw;
    }
    .notes-list__filter {
        grid-template-columns: 1fr;
    }
    .note-form__story-row {
        grid-template-columns: 1fr 1fr;
    }
    .note-form__form {
        padding: 1rem 0.3rem 0.7rem 0.3rem;
    }
    .note-form__page-row {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    .note-form__actions {
        flex-direction: column-reverse;
        gap: 0.7rem;
        align-items: stretch;
    }
}

.page-row-flex {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.7rem;
}
.page-row-flex select,
.page-row-flex input {
  text-align: center !important;
  direction: rtl !important;
  font-size: 1.1rem;
}

.page-row-flex select {
  text-align-last: center !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.btn-delete-page {
    border: none !important;
    border-radius: 2rem !important;
    padding: 0.5rem 1.2rem !important;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.2s;
    margin: 0 0.2rem;
}
.btn-delete-page:hover {
    color: #e46557 !important;
}

/* سوییچ پرداخت شده */
.pay-switch-row {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    justify-content: center;

}
.pay-switch-row .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pay-switch-row .form-check-label {
    margin-right: 0.5rem;
    font-size: 1.1rem;
    color: #fff;
    margin-top: 1em;
}
.pay-switch-row .form-check-input {
    width: 3em;
    height: 1.3em;
    margin-top: 1em;
}

@media (max-width: 700px) {
    .page-row-flex {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
}

.title-bg {
    display: inline-block;
    background: rgba(255, 179, 71, 0.15);
    border-radius: 1.5em;
    padding: 0.5em 2em;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px 0 #0002;
}

@media (min-width: 992px) {
  .main-content {
    padding-top: 6rem !important;
    padding-bottom: 2rem !important;
    min-height: unset !important;
    display: block !important;
  }
  .row.justify-content-center {
    width: 100%;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
  }
  .col-12, .col-md-10, .col-lg-8 {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 700px !important;
    min-width: 0 !important;
  }
  .card {
    width: 100% !important;
    max-width: 700px !important;
    margin: 0 !important;
  }
} 

/* استایل پاپ‌آپ تایید حذف */
.delete-modal-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.delete-modal {
  background: #23243a;
  color: #fff;
  border-radius: 1.5rem;
  box-shadow: 0 8px 32px 0 #0008;
  padding: 2rem 2.5rem;
  text-align: center;
  min-width: 280px;
  max-width: 90vw;
}
.delete-modal button {
  margin: 0 0.7rem;
  padding: 0.6rem 2.2rem;
  font-size: 1.1rem;
} 

.notes-list__cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.notes-list__card {
  border-radius: 1.5rem;
  box-shadow: 0 8px 32px 0 #0004;
  background: rgba(40,42,60,0.97);
  padding: 1.2rem 1.5rem;
  transition: box-shadow 0.2s, border 0.2s;
  border-right-width: 8px !important;
  border-right-style: solid !important;
  border-right-color: #ffb347 !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  margin-bottom: 1.5rem;
}
.notes-list__card:hover {
  box-shadow: 0 12px 36px 0 #0006;
  border-right-width: 12px !important;
}
.notes-list__card .row {
  margin: 0;
}
.notes-list__card span,
.notes-list__card label {
  font-size: 1.08rem;
}
.notes-list__card .form-switch {
  min-width: 110px;
}
.notes-list__card .btn-link {
  outline: none;
  border: none;
  background: none;
  box-shadow: none;
  font-size: 1.2rem;
  margin: 0 0.2rem;
  transition: color 0.2s;
}
.notes-list__card .btn-link:hover .bi-pencil-square {
  color: #ffc107 !important;
}
.notes-list__card .btn-link:hover .bi-trash {
  color: #e74c3c !important;
}
@media (max-width: 700px) {
  .notes-list__card {
    padding: 0.7rem 0.5rem;
    border-radius: 1rem;
  }
  .notes-list__cards {
    gap: 1rem;
  }
} 

.notes-list__card-grid {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.notes-list__card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.notes-list__card-row--top {
  border-bottom: 1px solid #333b4a;
  padding-bottom: 0.5rem;
}
.notes-list__card-group {
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  min-width: 120px;
}
.notes-list__card-dateprice {
  display: flex;
  gap: 1.2rem;
  color: #e0e0e0;
  font-size: 1.08rem;
}
.notes-list__card-date, .notes-list__card-price {
  opacity: 0.95;
}
.notes-list__card-row--bottom {
  padding-top: 0.5rem;
}
.notes-list__card-viewincome {
  display: flex;
  gap: 1.2rem;
  color: #bdbdbd;
  font-size: 1.08rem;
}
.notes-list__card-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.notes-list__card .form-switch {
  min-width: 110px;
}
.notes-list__card .btn-link {
  outline: none;
  border: none;
  background: none;
  box-shadow: none;
  font-size: 1.2rem;
  margin: 0 0.2rem;
  transition: color 0.2s;
}
.notes-list__card .btn-link:hover .bi-pencil-square {
  color: #ffc107 !important;
}
.notes-list__card .btn-link:hover .bi-trash {
  color: #e74c3c !important;
}
.notes-list__card {
  border-radius: 1.5rem;
  box-shadow: 0 8px 32px 0 #0004;
  background: #23243a;
  padding: 1.2rem 1.5rem;
  transition: box-shadow 0.2s, border 0.2s;
  border-right-width: 8px !important;
  border-right-style: solid !important;
  border-right-color: #ffb347 !important;
}
.notes-list__card:hover {
  box-shadow: 0 12px 36px 0 #0006;
  border-right-width: 12px !important;
}
@media (max-width: 700px) {
  .notes-list__card {
    padding: 0.7rem 0.5rem;
    border-radius: 1rem;
  }
  .notes-list__cards {
    gap: 1rem;
  }
  .notes-list__card-row, .notes-list__card-dateprice, .notes-list__card-viewincome {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
} 

.btn-primary {
  background-color: #0d6efd !important;
  border-color: #0d6efd !important;
  color: #fff !important;
}
.btn-primary:active, .btn-primary:focus, .btn-primary:hover {
  background-color: #0b5ed7 !important;
  border-color: #0a58ca !important;
  color: #fff !important;
} 

.notes-list__cards .card.text-center {
  color: #fff !important;
  background: rgba(40,42,60,0.95) !important;
  border: 2px solid #fff !important;
  border-radius: 2rem !important;
  max-width: 100% !important;
  margin: 0 auto 1.5rem auto !important;
} 

.notes-list__empty {
  color: #fff !important;
  background: rgba(40,42,60,0.95) !important;
  border: 2px solid #fff !important;
  border-radius: 2rem !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 1.5rem 1rem !important;
  font-size: 1.2rem;
} 

.settings__input::placeholder {
  color: #fff !important;
  opacity: 1 !important;
}
input::placeholder {
  color: #fff !important;
  opacity: 1 !important;
} 

.settings__inputbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  background: #23243a;
  border: 5px solid #2c2b2b !important;
  border-radius: 1.5rem;
  max-width: 520px;
  min-width: 320px;
  margin: 0 auto;
}
.settings__input {
  height: 38px;
  line-height: 38px;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
  display: flex;
  align-items: center;
} 

.users__list {
    background: rgba(40, 42, 60, 0.95);
    border-radius: 1.5rem;
    border: 5px solid #2c2b2b;
    color: #fff;
    margin: 2rem auto;
    width: 100%;
    overflow: hidden;
    padding: 0;
}
.users__item {
    background: transparent;
    border-bottom: 1px solid #444;
    color: #fff;
    padding: 0.7rem 0.5rem;
    border-radius: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.7rem;
}
.users__item:first-child {
    margin-top: 0.7rem;
}
.users__item-actions .btn {
    margin: 0 0.2rem;
    padding: 0.3rem 0.8rem !important;
    font-size: 1.1rem;
}
@media (max-width: 700px) {
    .users__list {
        max-width: 98vw;
        min-width: 0 !important;
    }
    .users__item {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
} 

.current-user-label {
    background: #27ae60 !important;
    color: #fff !important;
    border: 2px solid #1abc9c;
    font-size: 1rem;
    margin-right: 0.5rem;
    box-shadow: 0 2px 8px #1abc9c33;
}
.users__item[data-role='super_admin'] { border-right: 8px solid #e74c3c !important; }
.users__item[data-role='admin'] { border-right: 8px solid #ffb347 !important; }
.users__item[data-role='user'] { border-right: 8px solid #3498db !important; }
.users__item[style*='#bbb'] { border-right: 8px solid #bbb !important; opacity: 0.7; } 

.mobile-menu-box {
    background: #23243a;
    color: #fff !important;
    border-radius: 1.2rem;
    padding: 0.7rem 1.2rem;
    margin-bottom: 0.3rem;
    text-align: right;
    font-weight: bold;
    font-size: 1.08rem;
    transition: background 0.2s, color 0.2s;
    border: 1.5px solid #444;
    box-shadow: 0 2px 8px #0002;
    display: block;
}
.mobile-menu-box:hover, .mobile-menu-box:focus {
    background: #2d2e4a;
    color: #ffd700 !important;
    border-color: #ffd700;
}
.mobile-logout-btn {
    font-size: 1.08rem;
    border-radius: 1.2rem;
    padding: 0.6rem 1.2rem;
    margin-top: 0.7rem;
    font-weight: bold;
    border-width: 2px;
} 

@media (max-width: 700px) {
  .pay-switch-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
  }
  .pay-switch-row .form-check {
    width: 100% !important;
    justify-content: flex-start !important;
  }
  .pay-switch-row .form-check-label {
    margin-top: 0 !important;
    margin-right: 0.5rem !important;
    font-size: 1.1rem !important;
    white-space: normal !important;
    text-align: right !important;
  }
} 