/* ============================================
   Picksoso.Net Ajans Yönetim Paneli
   Özel Stiller — Mobil Öncelikli
   ============================================ */

:root {
    --sidebar-width: 260px;
    --sidebar-bg: #0a0f1a;
    --sidebar-hover: #141c2b;
    --sidebar-active: #2ECC71;
    --body-bg: #f1f5f9;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent: #2ECC71;
    --accent-light: #4ADE80;
    --accent-dark: #1FA85A;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gradient-1: linear-gradient(135deg, #2ECC71 0%, #1FA85A 100%);
    --gradient-2: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    --gradient-3: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-4: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--body-bg);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ====== Scrollbar ====== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ====== Login Page ====== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0f1a 0%, #0d1a12 50%, #0f2318 100%);
    padding: 1rem;
}

.login-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-card h2 {
    color: #fff;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-card .subtitle {
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.login-card .form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
}

.login-card .form-control:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.25);
    color: #fff;
}

.login-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.login-card .form-label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 0.875rem;
}

.login-card .btn-login {
    background: var(--gradient-1);
    border: none;
    color: #fff;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    width: 100%;
    transition: var(--transition);
}

.login-card .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.login-logo {
    width: 120px;
    height: auto;
    margin: 0 auto 1.25rem;
    display: block;
}

/* ====== Sidebar ====== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.sidebar-brand-logo {
    width: 38px;
    height: auto;
    flex-shrink: 0;
}

.sidebar-brand-text {
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
}

.sidebar-brand-text small {
    display: block;
    font-weight: 400;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

.sidebar-nav {
    padding: 1rem 0.75rem;
    flex: 1;
}

.sidebar-nav .nav-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
    padding: 0.75rem 0.75rem 0.4rem;
    margin-top: 0.5rem;
}

.sidebar-nav .nav-item {
    margin-bottom: 2px;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.6);
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background: var(--sidebar-hover);
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background: var(--sidebar-active);
    box-shadow: 0 2px 10px rgba(46, 204, 113, 0.3);
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.sidebar-footer .nav-link {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.85rem;
    padding: 0.5rem 0.5rem;
}

.sidebar-footer .nav-link:hover {
    color: var(--danger) !important;
    background: rgba(239, 68, 68, 0.1);
}

/* ====== Main Content ====== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

/* ====== Top Navbar ====== */
.top-navbar {
    background: var(--card-bg);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1020;
    gap: 1rem;
}

.top-navbar .page-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 0;
}

.top-navbar .btn-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-primary);
    padding: 0.25rem;
    cursor: pointer;
}

.top-navbar .user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.top-navbar .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
}

.top-navbar .user-avatar-img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-light);
    flex-shrink: 0;
}

/* ====== Content Area ====== */
.content-area {
    padding: 1.5rem;
}

/* ====== Stat Cards ====== */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 1rem;
}

.stat-card .stat-icon.purple {
    background: var(--gradient-1);
}

.stat-card .stat-icon.green {
    background: var(--gradient-2);
}

.stat-card .stat-icon.orange {
    background: var(--gradient-3);
}

.stat-card .stat-icon.red {
    background: var(--gradient-4);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* ====== Cards ====== */
.card-modern {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.card-modern .card-header {
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.card-modern .card-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.card-modern .card-body {
    padding: 1.5rem;
}

/* ====== Tables ====== */
.table-modern {
    width: 100%;
    margin-bottom: 0;
}

.table-modern thead th {
    background: #f8fafc;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.85rem 1rem;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.table-modern tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 0.9rem;
}

.table-modern tbody tr:hover {
    background: #f8fafc;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

/* ====== Buttons ====== */
.btn-primary-gradient {
    background: var(--gradient-1);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-primary-gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.35);
    color: #fff;
}

.btn-sm-touch {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-whatsapp {
    background: #25D366;
    border: none;
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-whatsapp:hover {
    background: #1eb851;
    color: #fff;
    transform: translateY(-1px);
}

/* ====== Alert Cards ====== */
.alert-expiry {
    background: linear-gradient(135deg, #fef2f2, #fff1f2);
    border: 1px solid #fecaca;
    border-left: 4px solid var(--danger);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-expiry i {
    color: var(--danger);
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-expiry .alert-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #991b1b;
}

.alert-expiry .alert-text {
    font-size: 0.82rem;
    color: #b91c1c;
    margin-top: 2px;
}

/* ====== Tabs ====== */
.nav-tabs-modern {
    border-bottom: 2px solid #e2e8f0;
    gap: 0;
}

.nav-tabs-modern .nav-link {
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.nav-tabs-modern .nav-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent-light);
}

.nav-tabs-modern .nav-link.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: transparent;
}

/* ====== Forms ====== */
.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid #e2e8f0;
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.15);
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

/* ====== Badges ====== */
.badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

/* ====== Empty State ====== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.95rem;
    margin: 0;
}

/* ====== Overlay for mobile sidebar ====== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
    backdrop-filter: blur(4px);
}

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

/* ====== Modal customization ====== */
.modal-content {
    border-radius: var(--radius);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
}

.modal-header .modal-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 1rem 1.5rem;
}

/* ====== Responsive ====== */

/* Tablet */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

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

    .top-navbar .btn-hamburger {
        display: block;
    }

    .content-area {
        padding: 1rem;
    }
}

/* Mobile */
@media (max-width: 575.98px) {
    .content-area {
        padding: 0.75rem;
    }

    .stat-card {
        padding: 1.15rem;
    }

    .stat-card .stat-value {
        font-size: 1.4rem;
    }

    .card-modern .card-header {
        padding: 1rem;
    }

    .card-modern .card-body {
        padding: 1rem;
    }

    .table-modern thead th,
    .table-modern tbody td {
        padding: 0.65rem 0.75rem;
        font-size: 0.82rem;
    }

    .top-navbar {
        padding: 0.65rem 1rem;
    }

    .top-navbar .page-title {
        font-size: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .nav-tabs-modern .nav-link {
        padding: 0.7rem 0.75rem;
        font-size: 0.82rem;
    }

    .btn-primary-gradient {
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
    }
}

/* ====== Customer Notes ====== */
.notes-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    padding: 0.25rem;
}

.note-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.note-card.pinned {
    border-color: #2ECC71;
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.15), 0 4px 12px rgba(46, 204, 113, 0.08);
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.note-card.pinned:hover {
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.25), 0 12px 28px rgba(46, 204, 113, 0.12);
}

.note-card .note-header {
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(to bottom, #fafbfc, transparent);
}

.note-card .note-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.note-card .note-icon.type-sifre {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.note-card .note-icon.type-bilgi {
    background: linear-gradient(135deg, #2ECC71 0%, #1FA85A 100%);
}

.note-card .note-icon.type-genel {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.note-card .note-title-wrap {
    flex: 1;
    min-width: 0;
}

.note-card .note-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-card .note-type-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    margin-top: 3px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.note-card .note-type-label.type-sifre {
    color: #ef4444;
}

.note-card .note-type-label.type-bilgi {
    color: #2ECC71;
}

.note-card .note-type-label.type-genel {
    color: #22c55e;
}

.note-card .note-pin {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    color: #2ECC71;
    font-size: 0.95rem;
    animation: pinPulse 2s ease-in-out infinite;
}

@keyframes pinPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.note-card .note-body {
    padding: 1rem 1.25rem;
    flex: 1;
}

.note-card .note-content {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.note-secret-content {
    position: relative;
}

.note-secret-content .secret-text {
    filter: blur(6px);
    -webkit-filter: blur(6px);
    user-select: none;
    -webkit-user-select: none;
    transition: filter 0.4s ease;
    padding: 0.5rem;
    background: repeating-linear-gradient(45deg,
            rgba(239, 68, 68, 0.03),
            rgba(239, 68, 68, 0.03) 10px,
            transparent 10px,
            transparent 20px);
    border-radius: 8px;
    border: 1px dashed rgba(239, 68, 68, 0.15);
}

.note-secret-content .secret-text.revealed {
    filter: none !important;
    -webkit-filter: none !important;
    user-select: auto;
    -webkit-user-select: auto;
    background: rgba(34, 197, 94, 0.04);
    border-color: rgba(34, 197, 94, 0.2);
    border-style: solid;
}

.note-secret-content .btn-reveal {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(239, 68, 68, 0.08);
    border: 1.5px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.65rem;
}

.note-secret-content .btn-reveal:hover {
    background: rgba(239, 68, 68, 0.15);
    transform: scale(1.03);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.note-secret-content .btn-reveal.revealed-btn {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.25);
    color: #16a34a;
}

.note-card .note-footer {
    padding: 0.8rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
}

.note-card .note-date {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.note-add-card {
    border: 2.5px dashed #cbd5e1;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.02), rgba(31, 168, 90, 0.02));
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: #94a3b8;
    gap: 0.65rem;
}

.note-add-card:hover {
    border-color: #2ECC71;
    color: #2ECC71;
    background: rgba(46, 204, 113, 0.04);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(46, 204, 113, 0.08);
}

.note-add-card i {
    font-size: 2.2rem;
    opacity: 0.6;
}

.note-add-card span {
    font-weight: 700;
    font-size: 0.92rem;
}

.note-add-card small {
    font-size: 0.78rem;
    opacity: 0.7;
}

@media (max-width: 575.98px) {
    .notes-grid {
        grid-template-columns: 1fr;
    }
}

/* ====== Payment Status ====== */
.payment-row-overdue {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.06) 0%, transparent 40%) !important;
    border-left: 3px solid var(--danger);
}

.payment-row-pending {
    border-left: 3px solid var(--warning);
}

.payment-row-paid {
    border-left: 3px solid var(--success);
    opacity: 0.75;
}

.payment-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
}

.payment-status-badge.overdue {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.payment-status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

.payment-status-badge.paid {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}

.alert-overdue {
    background: linear-gradient(135deg, #fef2f2, #fff7ed);
    border: 1px solid #fed7aa;
    border-left: 4px solid var(--danger);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-overdue i {
    color: var(--danger);
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-overdue .alert-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #991b1b;
}

.alert-overdue .alert-text {
    font-size: 0.82rem;
    color: #b91c1c;
    margin-top: 2px;
}

.alert-overdue .alert-amount {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--danger);
    margin-left: auto;
    white-space: nowrap;
}

.payment-filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.payment-filter-bar .btn-filter {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: transparent;
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
}

.payment-filter-bar .btn-filter:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.payment-filter-bar .btn-filter.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ====== Service Detail Page ====== */
.service-detail-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2ECC71 0%, #1FA85A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.service-price-display {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent, #2ECC71);
    letter-spacing: -0.5px;
}

.service-info-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    background: #f1f5f9;
    font-size: 0.82rem;
    color: #475569;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.service-info-chip:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.service-info-chip i {
    font-size: 0.9rem;
}

.payment-row-overdue {
    background: rgba(239, 68, 68, 0.04) !important;
    border-left: 3px solid #ef4444;
}

.payment-row-paid {
    background: rgba(34, 197, 94, 0.04) !important;
    border-left: 3px solid #22c55e;
}

.payment-row-pending {
    border-left: 3px solid #f59e0b;
}

.progress {
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.4s ease-out forwards;
}

.fade-in-up:nth-child(2) {
    animation-delay: 0.05s;
}

.fade-in-up:nth-child(3) {
    animation-delay: 0.1s;
}

.fade-in-up:nth-child(4) {
    animation-delay: 0.15s;
}

/* ====== Calendar ====== */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card-bg);
}

.calendar-day-header {
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.calendar-day {
    min-height: 110px;
    padding: 0.5rem;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.calendar-day:hover {
    background: #f0fdf4;
}

.calendar-day.empty {
    background: #fafbfc;
    cursor: default;
}

.calendar-day.today {
    background: rgba(46, 204, 113, 0.04);
    box-shadow: inset 0 0 0 2px rgba(46, 204, 113, 0.25);
}

.calendar-day.has-items {
    background: rgba(59, 130, 246, 0.02);
}

.calendar-day-number {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.calendar-day-number.today-number {
    background: var(--gradient-1);
    color: #fff;
    font-weight: 700;
}

.calendar-day-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calendar-event {
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 3px;
    line-height: 1.4;
}

.calendar-event span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event i {
    font-size: 0.65rem;
    flex-shrink: 0;
}

.calendar-event.payment-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    border-left: 2px solid #f59e0b;
}

.calendar-event.payment-overdue {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border-left: 2px solid #ef4444;
}

.calendar-event.payment-paid {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border-left: 2px solid #22c55e;
    opacity: 0.7;
}

.calendar-event.event-custom {
    background: rgba(59, 130, 246, 0.08);
    color: #1e40af;
    border-left: 2px solid #3b82f6;
}

.calendar-event.event-custom.completed {
    opacity: 0.5;
    text-decoration: line-through;
}

.calendar-more {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 600;
    padding: 1px 6px;
    cursor: pointer;
}

/* Color picker */
.color-pick {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 3px solid transparent;
}

.color-pick:hover {
    transform: scale(1.15);
}

.color-pick input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.color-pick .color-check {
    display: none;
    color: #fff;
    font-size: 0.85rem;
}

.color-pick input:checked+.color-check {
    display: flex;
}

.color-pick:has(input:checked) {
    border-color: #fff;
    box-shadow: 0 0 0 2px currentColor, 0 2px 8px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* Week event items */
.week-event-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.88rem;
}

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

.week-event-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.border-accent {
    border: 2px solid var(--accent) !important;
}

/* ====== File Preview ====== */
.file-preview-frame {
    width: 100%;
    height: 70vh;
    border: none;
    border-radius: var(--radius-sm);
}

.file-card {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.file-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* ====== Calendar Mobile ====== */
@media (max-width: 767.98px) {
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    .calendar-day {
        min-height: 60px;
        padding: 0.25rem;
    }

    .calendar-day-number {
        font-size: 0.75rem;
        width: 22px;
        height: 22px;
    }

    .calendar-event {
        font-size: 0.6rem;
        padding: 1px 3px;
    }

    .calendar-event span {
        display: none;
    }

    .calendar-event i {
        font-size: 0.6rem;
    }

    .calendar-day-header {
        font-size: 0.65rem;
        padding: 0.5rem 0.2rem;
    }
}

@media (max-width: 575.98px) {
    .calendar-day {
        min-height: 48px;
        padding: 0.15rem;
    }

    .calendar-more {
        font-size: 0.6rem;
    }

    .week-event-item {
        flex-wrap: wrap;
        gap: 0.4rem;
        font-size: 0.82rem;
    }
}

/* ====== Print ====== */
@media print {

    .sidebar,
    .top-navbar,
    .btn,
    .modal {
        display: none !important;
    }

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

    .content-area {
        padding: 0;
    }
}

/* Notifications */
.notification-dropdown .dropdown-item {
    white-space: normal;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.notification-dropdown .dropdown-item:hover {
    background-color: var(--card-bg);
}

/* Toast Customization */
.toast-container {
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.bg-success.toast {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
}

.bg-danger.toast {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: white !important;
}

.bg-info.toast {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: white !important;
}

.bg-warning.toast {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: white !important;
}

/* ====== Dropzone / File Upload ====== */
.dropzone-area {
    border: 2px dashed #d1d5db;
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.02), rgba(34, 197, 94, 0.04));
}

.dropzone-area:hover {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.05), rgba(34, 197, 94, 0.08));
}

.dropzone-area.drag-over {
    border-color: var(--accent);
    background: rgba(46, 204, 113, 0.1);
    transform: scale(1.01);
}

.dropzone-content {
    pointer-events: none;
}

.dropzone-content label {
    pointer-events: auto;
    cursor: pointer;
}

.dropzone-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.dropzone-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(46, 204, 113, 0.15);
    border-radius: var(--radius);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-dark);
    animation: pulse 1s ease infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.file-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.file-preview-frame {
    width: 100%;
    height: 75vh;
    border: none;
}

@media (max-width: 575.98px) {
    .dropzone-area {
        padding: 1.5rem 1rem;
    }

    .dropzone-icon {
        font-size: 2rem;
    }

    .file-preview-frame {
        height: 50vh;
    }
}