/* Custom Styles for Agrimmitra */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

.datatable-wrapper .datatable-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.datatable-table {
    min-width: 1200px;
    width: max-content;
}

#datatablesSimple th,
#datatablesSimple td {
    white-space: nowrap;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5f7d 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand img {
    height: 45px;
    width: auto;
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user {
    color: #ecf0f1;
}

.nav-link {
    color: #ecf0f1;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #ecf0f1;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 0.5rem;
}

/* Sidebar Styles */
.app-layout {
    display: flex;
    min-height: calc(100vh - 120px);
}

.sidebar {
    width: 220px;
    background: #1e2a3a;
    position: fixed;
    left: 0;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    padding: 0;
    flex: 1;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: #a8b5c7;
    text-decoration: none;
    transition: all 0.3s;
    gap: 0.75rem;
}

.menu-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.menu-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-left: 3px solid #4a9eff;
}

.menu-icon {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-icon svg {
    stroke: currentColor;
}

.menu-text {
    flex: 1;
    font-size: 0.9rem;
}

/* Accordion Menu Styles */
.menu-accordion {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-accordion-header {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: #a8b5c7;
    cursor: pointer;
    transition: all 0.3s;
    gap: 0.75rem;
    user-select: none;
    background: transparent;
}

.menu-accordion-header:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.menu-accordion-header.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.accordion-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    color: #a8b5c7;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.accordion-arrow svg {
    stroke: currentColor;
}

.menu-accordion.expanded .accordion-arrow {
    transform: rotate(90deg);
}

.menu-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.15);
    padding: 0;
    list-style: none;
    margin: 0;
}

.menu-submenu.expanded {
    max-height: 1000px;
}

.submenu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.submenu-item:last-child {
    border-bottom: none;
}

.submenu-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem 0.65rem 3rem;
    color: #8a9bb0;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.submenu-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.submenu-link.active {
    background: rgba(74, 158, 255, 0.15);
    color: #4a9eff;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.logged-in-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.logged-in-label {
    font-size: 0.75rem;
    color: #6b7a8c;
}

.logged-in-user {
    font-size: 0.85rem;
    color: #a8b5c7;
    font-weight: 500;
}

.main-content {
    flex: 1;
    margin-left: 220px;
    transition: margin-left 0.3s ease;
    padding-top: 0;
    min-height: calc(100vh - 60px);
}

.main-content.has-sidebar {
    margin-left: 220px;
}

.notification-icon {
    position: relative;
    color: #ecf0f1;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s;
    margin-right: 0.5rem;
}

.notification-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.notification-icon svg {
    width: 24px;
    height: 24px;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    border: 2px solid #1e3a5f;
    padding: 0 4px;
}

.inline-form {
    display: inline;
}

.btn-link {
    background: none;
    border: none;
    color: #ecf0f1;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover {
    color: white;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Alerts */
.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Forms */
.form-card, .filters-card, .detail-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border-top: 3px solid #27ae60;
}

.form-card h2, .detail-card h2 {
    color: #1e3a5f;
    border-bottom: 2px solid #27ae60;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    margin-top: 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0;
    color: #1e3a5f;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1e3a5f;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #7f8c8d;
    font-size: 0.8rem;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

/* Custom Badges */
.badge-lead-submitted {
    background-color: #1e3a5f;
    color: white;
}

.badge-lead-under-review {
    background-color: #f39c12;
    color: white;
}

.badge-approved {
    background-color: #27ae60;
    color: white;
}

.badge-rejected {
    background-color: #e74c3c;
    color: white;
}

.badge-disbursed {
    background-color: #16a085;
    color: white;
}

.badge-payment-handover {
    background-color: #8e44ad;
    color: white;
}

.badge-cancel {
    background-color: #95a5a6;
    color: white;
}

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 4px solid #1e3a5f;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 58, 95, 0.2);
}

.stat-card h3 {
    margin: 0 0 0.5rem 0;
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #1e3a5f;
    margin: 0;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.dashboard-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-section h2 {
    margin-top: 0;
    color: #1e3a5f;
    border-bottom: 2px solid #27ae60;
    padding-bottom: 0.5rem;
}

/* Auth Page */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3a5f 0%, #27ae60 100%);
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

.auth-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.auth-card h1 {
    text-align: center;
    color: #1e3a5f;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.auth-card h2 {
    text-align: center;
    color: #7f8c8d;
    font-size: 1rem;
    font-weight: normal;
    margin-bottom: 2rem;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
}

.tab-btn.active {
    background: white;
    border-bottom: none;
    font-weight: 500;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5f7d 100%);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

/* Detail Views */
.detail-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-weight: 500;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.detail-item span {
    color: #1e3a5f;
}

/* Status History */
.status-history {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    padding: 1rem;
    background: #f8f9fa;
    border-left: 4px solid #1e3a5f;
    border-radius: 4px;
}

.history-status {
    font-weight: 500;
    color: #1e3a5f;
    margin-bottom: 0.5rem;
}

.history-meta {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.history-remarks {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #ddd;
    color: #1e3a5f;
}

/* Documents */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Notifications */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #ddd;
    transition: all 0.3s;
}

.notification-item.unread {
    border-left-color: #1e3a5f;
    background: #f8f9ff;
}

.notification-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.notification-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    margin: 0;
    color: #1e3a5f;
}

.notification-link {
    color: #1e3a5f;
    text-decoration: none;
}

.notification-link:hover {
    text-decoration: underline;
}

.notification-preview {
    color: #7f8c8d;
    margin: 0;
}

.notification-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #7f8c8d;
    flex-wrap: wrap;
}

.has-attachment {
    color: #27ae60;
    font-weight: 500;
}

.notification-detail {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message-content {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    white-space: pre-wrap;
    line-height: 1.6;
}

.notification-attachment {
    margin-top: 1rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 8px;
    color: #7f8c8d;
}

.reply-count {
    color: #27ae60;
    font-weight: 500;
}

/* Notification Thread */
.notification-thread {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
}

.thread-message {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #ddd;
}

.thread-message.sent {
    border-left-color: #27ae60;
    background: #f0f8f0;
}

.thread-message.received {
    border-left-color: #2196F3;
    background: #f0f8ff;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}

.message-sender {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-role {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.message-date {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.message-title {
    margin-bottom: 0.75rem;
    color: #1e3a5f;
}

.message-body {
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
}

.message-attachment {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.reply-form-container {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 2px solid #1e3a5f;
}

.reply-form-container h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #1e3a5f;
}

.reply-form {
    margin-top: 1rem;
}

.user-select {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
}

/* Search Styles */
.search-container {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.search-form {
    margin: 0;
}

.search-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.search-btn {
    white-space: nowrap;
}

.search-results-info {
    background: #e8f4f8;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid #1e3a5f;
}

.search-results-info p {
    margin: 0;
    color: #1e3a5f;
}

.notification-item.sent-item {
    border-left-color: #27ae60;
}

.recipients-list {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
    color: #7f8c8d;
}

/* Resources */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.resource-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 4px solid #27ae60;
    transition: transform 0.3s, box-shadow 0.3s;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.resource-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.resource-card h2 {
    color: #1e3a5f;
    margin-bottom: 1rem;
}

.resource-card p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Calculator Results */
.emi-result-display,
.payout-result-display {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 4px;
}

.result-item label {
    font-weight: 500;
    color: #1e3a5f;
}

.result-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #27ae60;
}

.amortization-header-summary {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4f8 100%);
    border: 2px solid #1e3a5f;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: white;
    border-radius: 4px;
    border-left: 3px solid #27ae60;
}

.summary-item label {
    font-weight: 500;
    color: #7f8c8d;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.summary-item span {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1e3a5f;
}

/* Modal */
#share-email-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#share-email-modal .form-card {
    max-width: 500px;
    margin: 2rem;
    position: relative;
}

/* Amortization Accordion */
.amortization-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5a7f 100%);
    color: white;
    cursor: pointer;
    transition: background 0.3s;
    user-select: none;
}

.accordion-header:hover {
    background: linear-gradient(135deg, #2c5a7f 0%, #3d6a9f 100%);
}

.accordion-header-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.accordion-year {
    font-size: 1.3rem;
    font-weight: bold;
}

.accordion-summary {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
    flex-wrap: wrap;
}

.accordion-summary span {
    display: flex;
    align-items: center;
}

.accordion-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
    margin-left: 1rem;
}

.accordion-content {
    padding: 0;
    background: white;
}

.accordion-content .table {
    margin: 0;
    border: none;
}

.accordion-content .table thead {
    background: #f8f9fa;
}

.accordion-content .table thead th {
    border-bottom: 2px solid #1e3a5f;
    font-weight: 600;
    color: #1e3a5f;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dashboard-actions {
        flex-direction: column;
    }

    .dashboard-actions .btn {
        width: 100%;
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .detail-row {
        grid-template-columns: 1fr;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .form-card,
    .filters-card,
    .detail-card {
        padding: 1.5rem;
    }

    .header-actions {
        width: 100%;
        margin-top: 1rem;
    }

    .header-actions .btn {
        width: 100%;
    }

    .notification-icon {
        margin-right: 0.25rem;
        padding: 0.25rem;
    }

    .notification-icon svg {
        width: 20px;
        height: 20px;
    }

    .notification-badge {
        min-width: 16px;
        height: 16px;
        font-size: 0.6rem;
        top: 0;
        right: 0;
    }

    .notifications-list {
        gap: 0.75rem;
    }

    .notification-item {
        padding: 1rem;
    }

    .notification-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .resources-grid {
        grid-template-columns: 1fr;
    }

    .resource-card {
        padding: 1.5rem;
    }

    .amortization-summary {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .amortization-header-summary {
        padding: 1rem;
    }

    .accordion-header {
        padding: 0.75rem 1rem;
    }

    .accordion-year {
        font-size: 1.1rem;
    }

    .accordion-summary {
        flex-direction: column;
        gap: 0.25rem;
        font-size: 0.85rem;
    }

    .accordion-content {
        overflow-x: auto;
    }

    /* Search Mobile */
    .search-input-group {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    .search-btn {
        width: 100%;
    }

    /* Sidebar Mobile */
    .sidebar-mobile-toggle {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
        margin-right: 0.5rem;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .main-content.has-sidebar {
        margin-left: 0;
    }

    .app-layout {
        flex-direction: column;
    }

    .menu-accordion-header {
        padding: 0.75rem 1rem;
    }

    .submenu-link {
        padding: 0.65rem 1rem 0.65rem 2.5rem;
        font-size: 0.85rem;
    }

    .sidebar-footer {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem 0;
    }

    .page-header h1 {
        font-size: 1.25rem;
    }

    .form-card,
    .filters-card,
    .detail-card {
        padding: 1rem;
    }

    .auth-card h1 {
        font-size: 1.25rem;
    }

    .auth-card h2 {
        font-size: 0.9rem;
    }
}
