/* =============================================
   CYBERVIS Client Portal - Shared Styles
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap');

/* CSS Variables - Dark Theme */
:root {
    /* Background Colors - Dark */
    --bg-primary: #1e1e1e;
    --bg-secondary: #171717;
    --bg-tertiary: #2d2d2d;
    --bg-card: #171717;
    --bg-white: #FFFFFF;

    /* Sidebar Colors */
    --bg-sidebar-card-top: #353535;
    --sidebar-bg: #171717;
    --sidebar-border: #2e2e2e;

    /* Primary Colors */
    --primary: #171717;
    --primary-light: #252525;

    /* Accent Colors */
    --accent: #8E76EF;
    --accent-blue: #6B8DE3;
    --accent-purple: #7D1C8D;
    --accent-pink: #FF6B9D;
    --accent-cyan: #00D4FF;
    --text-premium-yellow: #f7b91c;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #676767;
    --text-muted: #a1a0a0;

    /* Border Colors */
    --border-color: #2e2e2e;
    --card-stack-border: #696969;

    /* Icon Backgrounds */
    --icon-background: #2d2d2d;

    /* Tooltip Colors */
    --tooltip-head: #1d1d1d;
    --tooltip-body: #252525;

    /* Gradient Colors */
    --gradient-featured: linear-gradient(135deg, #8E76EF 0%, #3912D2 100%);
    --gradient-progress: linear-gradient(to right, #8E76EF 0%, #3912D2 100%);
    --gradient-chart-line: linear-gradient(to right, #6B8DE3 0%, #7D1C8D 100%);

    /* Semantic Colors */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f7b91c;

    /* Border Radius */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 15px;
    --radius-xl: 20px;

    /* Spacing */
    --gap-cards: 8px;
    --padding-card: 12px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.5);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg-primary);
    color: var(--text-secondary);
    min-height: 100vh;
    font-weight: 400;
}

/* =============================================
   Login/Register Page Styles
   ============================================= */
.portal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #7C5CFF 0%, #5B8DEF 50%, #00D4FF 100%);
}

.portal-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.portal-logo {
    text-align: center;
    margin-bottom: 30px;
}

.portal-logo img {
    margin-bottom: 15px;
}

.portal-logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.portal-logo p {
    font-size: 0.9rem;
}

/* Form Styles */
.form-group label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group label i {
    color: var(--accent);
    margin-right: 4px;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-white);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(232, 168, 56, 0.15), 0 4px 12px rgba(232, 168, 56, 0.1);
    transform: translateY(-1px);
    background: white;
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.password-toggle:hover {
    color: var(--accent);
}

/* Portal Button */
.portal-btn {
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.portal-btn:hover {
    background: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(232, 168, 56, 0.3);
}

.portal-btn:active {
    transform: translateY(0);
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.form-footer .divider {
    color: var(--border-color);
    margin: 0 10px;
}

.portal-footer {
    text-align: center;
    margin-top: 20px;
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
}

.portal-footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.portal-footer a:hover {
    color: var(--accent);
}

/* =============================================
   Navigation
   ============================================= */
.portal-nav {
    background: var(--primary) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    padding: 10px 20px;
}

.portal-nav .navbar-brand {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.portal-nav .nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-weight: 500;
    padding: 8px 15px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.9rem;
}

.portal-nav .nav-link:hover {
    color: var(--accent) !important;
    background: rgba(255,255,255,0.08);
}

.portal-nav .nav-link i {
    margin-right: 5px;
}

/* =============================================
   Loading Screen
   ============================================= */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    z-index: 9999;
}

.loading-screen .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* =============================================
   Main Content Area
   ============================================= */
.portal-main {
    padding: 30px;
    margin-top: 10px;
}

.section-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.section-title i {
    color: var(--accent);
    margin-right: 8px;
}

/* =============================================
   Dashboard Grid Layout
   ============================================= */
.employee-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--gap-cards);
    margin-bottom: var(--gap-cards);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--gap-cards);
    margin-bottom: var(--gap-cards);
}

.dashboard-row-bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-cards);
}

/* Employee/Person Cards */
.employee-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-height: 128px;
}

.employee-info {
    flex: 1;
}

.employee-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.employee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 8px;
    flex-shrink: 0;
}

.employee-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.employee-details h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.employee-details .verified-badge {
    width: 14px;
    height: 14px;
    color: #6B8DE3;
}

.employee-details p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.employee-tasks {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 8px 0 6px 0;
}

.progress-bar {
    width: 176px;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    left: 38px;
    width: 2px;
    height: 6px;
    background: var(--bg-secondary);
    z-index: 2;
}

.progress-bar::after {
    content: '';
    position: absolute;
    left: 78px;
    width: 2px;
    height: 6px;
    background: var(--bg-secondary);
    z-index: 2;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-progress);
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar .progress-separator {
    position: absolute;
    width: 2px;
    height: 6px;
    background: var(--bg-secondary);
    top: 0;
    z-index: 2;
}

.employee-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stats-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 4px;
}

.stats-icon.bull {
    color: #10b981;
}

.stats-icon.bear {
    color: #ef4444;
}

.stats-amount {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}

.stats-amount.positive {
    color: #10b981;
}

.stats-amount.negative {
    color: #ef4444;
}

.stats-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Chart Cards */
.chart-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.chart-card:hover {
    box-shadow: var(--shadow-md);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.chart-header .chart-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Donut Chart Container */
.donut-chart-container {
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Horizontal Carousel */
.carousel-container {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-track {
    display: flex;
    gap: 12px;
    padding: 4px 0;
}

.carousel-card {
    min-width: 240px;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.05), rgba(91, 141, 239, 0.05));
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--sidebar-border);
    transition: var(--transition-fast);
    cursor: pointer;
}

.carousel-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-purple);
}

.carousel-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-featured);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}

.carousel-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.carousel-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

/* Area Chart Container */
.area-chart-container {
    height: 320px;
    position: relative;
}

/* Stats Mini Chart Card */
.stats-mini-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-mini {
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.05), rgba(91, 141, 239, 0.05));
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--sidebar-border);
}

.stat-mini-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.stat-mini-header h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-mini-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-mini-chart {
    height: 60px;
    width: 100%;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.stat-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* =============================================
   Stat Cards
   ============================================= */
.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: var(--padding-card);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow-sm);
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
    transition: var(--transition-fast);
}

.stat-documents .stat-icon {
    background: rgba(91, 141, 239, 0.15);
    color: var(--accent-blue);
}
.stat-signed .stat-icon {
    background: rgba(124, 92, 255, 0.15);
    color: var(--accent-purple);
}
.stat-services .stat-icon {
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-cyan);
}
.stat-payments .stat-icon {
    background: rgba(255, 107, 157, 0.15);
    color: var(--accent-pink);
}

.stat-info h4 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    line-height: 1;
}

.stat-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

/* =============================================
   Portal Cards
   ============================================= */
.portal-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow-sm);
}

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

.card-header-custom {
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.08) 0%, rgba(91, 141, 239, 0.08) 100%);
    padding: 18px 24px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--sidebar-border);
}

.card-header-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(232,168,56,0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.card-header-custom h5 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.card-header-custom h5 i {
    margin-right: 8px;
    color: var(--accent-purple);
}

.card-body-custom {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
}

/* Custom scrollbar for card body */
.card-body-custom::-webkit-scrollbar {
    width: 8px;
}

.card-body-custom::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.card-body-custom::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 4px;
}

.card-body-custom::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* =============================================
   Documents
   ============================================= */
.nav-tabs .nav-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    padding: 10px 20px;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

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

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

.nav-tabs .badge {
    font-size: 0.7rem;
    vertical-align: middle;
    margin-left: 5px;
}

.document-card {
    background: var(--bg-white);
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 22px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.document-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--status-color), var(--status-color-light));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.document-card:hover::before {
    transform: scaleY(1);
}

.document-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    transform: translateX(4px);
}

.document-card.pending {
    --status-color: #ffc107;
    --status-color-light: #ffeb3b;
    border-left-color: var(--warning);
}

.document-card.signed {
    --status-color: #28a745;
    --status-color-light: #4caf50;
    border-left-color: var(--success);
}

.document-info {
    flex: 1;
}

.document-info h6 {
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--primary);
}

.document-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.document-info .doc-meta {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.document-info .doc-meta span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.document-info .doc-meta i {
    margin-right: 4px;
}

.document-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    margin-left: 20px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.document-card:hover .document-actions {
    opacity: 1;
}

.document-actions .btn {
    border-radius: 10px;
    font-size: 0.85rem;
    padding: 8px 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.document-actions .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.document-actions .btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Badge styles */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 24px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.status-badge:hover::before {
    transform: translateX(100%);
}

.status-pending {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a8 100%);
    color: #856404;
    animation: pulse-pending 2s infinite;
}

.status-signed {
    background: linear-gradient(135deg, #d4edda 0%, #b8e6c3 100%);
    color: #155724;
}

.status-paid {
    background: linear-gradient(135deg, #d4edda 0%, #b8e6c3 100%);
    color: #155724;
}

.status-overdue {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c2c7 100%);
    color: #721c24;
    animation: pulse-pending 2s infinite;
}

.status-active {
    background: linear-gradient(135deg, #cce5ff 0%, #a8d8ff 100%);
    color: #004085;
}

@keyframes pulse-pending {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(255, 193, 7, 0); }
}

/* =============================================
   Signature Pad
   ============================================= */
.signature-area {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 14px;
    padding: 24px;
    border: 2px dashed var(--border-color);
    transition: all 0.3s ease;
}

.signature-area:focus-within {
    border-color: var(--accent-purple);
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.1);
}

.signature-pad-container {
    background: white;
    border-radius: 12px;
    border: 3px solid var(--border-color);
    overflow: hidden;
    max-width: 600px;
    position: relative;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.signature-pad-container:hover {
    border-color: var(--accent-purple);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05), 0 0 0 3px rgba(124, 92, 255, 0.1);
}

#signaturePad {
    display: block;
    width: 100%;
    touch-action: none;
    cursor: crosshair;
    transition: filter 0.2s ease;
}

#signaturePad.drawing-active {
    filter: brightness(0.98);
}

/* Signature controls */
.signature-options {
    margin-top: 12px;
}

.signature-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.signature-controls .btn {
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.signature-controls .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Pen size selector */
.pen-size-selector {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.pen-size-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 0;
}

.pen-size-option:hover {
    border-color: var(--accent-purple);
    transform: scale(1.1);
}

.pen-size-option.active {
    border-color: var(--accent-purple);
    background: var(--accent-purple);
    box-shadow: 0 2px 8px rgba(124, 92, 255, 0.3);
}

.pen-size-option .dot {
    background: var(--primary);
    border-radius: 50%;
}

.pen-size-option.active .dot {
    background: white;
}

.pen-size-option.thin .dot {
    width: 4px;
    height: 4px;
}

.pen-size-option.medium .dot {
    width: 6px;
    height: 6px;
}

.pen-size-option.thick .dot {
    width: 8px;
    height: 8px;
}

/* =============================================
   Services
   ============================================= */
.service-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    height: 100%;
}

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

.service-card.selected {
    border-color: var(--accent-purple);
    background: rgba(124, 92, 255, 0.05);
}

.service-card .service-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.1), rgba(91, 141, 239, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.5rem;
    color: var(--accent-purple);
}

.service-card h5 {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.service-card .check-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.service-card.selected .check-indicator {
    display: flex;
}

/* =============================================
   Payments
   ============================================= */
.payment-card {
    background: var(--bg-white);
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 22px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.payment-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.payment-info {
    flex: 1;
}

.payment-info h6 {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 3px;
}

.payment-amount {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--primary); /* Fallback */
    margin-right: 20px;
}

/* =============================================
   Activity Items
   ============================================= */
.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.activity-icon.icon-doc { background: #fff3cd; color: #856404; }
.activity-icon.icon-sign { background: #d4edda; color: #155724; }
.activity-icon.icon-pay { background: #cce5ff; color: #004085; }
.activity-icon.icon-service { background: #e2e3e5; color: #383d41; }

.activity-text {
    flex: 1;
}

.activity-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.activity-text small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Notification items */
.notification-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.notification-item p {
    margin: 0;
    font-size: 0.85rem;
}

.notification-item .badge {
    font-size: 0.7rem;
}

/* =============================================
   Alerts
   ============================================= */
.alert {
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    border: none;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
    .dashboard-grid,
    .dashboard-row-bottom {
        grid-template-columns: 1fr;
    }

    .carousel-card {
        min-width: 200px;
    }
    .portal-card {
        padding: 25px;
    }

    .portal-main {
        padding: 15px;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .stat-info h4 {
        font-size: 1.2rem;
    }

    .document-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .document-actions {
        margin-left: 0;
        margin-top: 12px;
        width: 100%;
    }

    .document-actions .btn {
        flex: 1;
    }

    .payment-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .payment-amount {
        margin: 10px 0;
    }

    .section-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .portal-card {
        padding: 20px;
        margin: 10px;
    }

    .portal-logo h2 {
        font-size: 1.3rem;
    }

    .service-card {
        padding: 18px;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* =============================================
   Custom File Input
   ============================================= */
.custom-file-label::after {
    background: var(--primary);
    color: white;
    border: none;
}

/* =============================================
   Progress Bar
   ============================================= */
.progress {
    height: 8px;
    border-radius: 4px;
}

.progress-bar {
    background: var(--accent);
}

/* =============================================
   Modal Overrides
   ============================================= */
.modal.fade .modal-dialog {
    transform: scale(0.9) translateY(-50px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25), 0 0 100px rgba(0,0,0,0.15);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, #253447 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    padding: 20px 26px;
    border-bottom: none;
}

.modal-header .close {
    color: white;
    opacity: 0.8;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(0,0,0,0.06);
    background: #fafbfc;
}
