/**
 * User Dashboard Styles
 * File: assets/css/dashboard.css
 */

:root {
    --primary-color: #2d4a6e;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --white: #ffffff;
}

/* Dashboard Wrapper */
.notary-dashboard-wrapper {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.dashboard-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.dashboard-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0;
}

/* Stats Cards */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-pending {
    background: #fef3c7;
    color: #f59e0b;
}

.stat-icon-completed {
    background: #d1fae5;
    color: #22c55e;
}

.stat-icon-total {
    background: #e0e7ff;
    color: #6366f1;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Content Card */
.content-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.content-card-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-card-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
}

.filter-select {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--white);
    cursor: pointer;
}

/* Submissions Table */
.submissions-table-wrapper {
    overflow-x: auto;
}

.submissions-table {
    width: 100%;
    border-collapse: collapse;
}

.submissions-table thead {
    background: var(--bg-light);
}

.submissions-table th {
    padding: 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submissions-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-dark);
}

.submissions-table tbody tr:hover {
    background: var(--bg-light);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-pending {
    background: #fef3c7;
    color: #f59e0b;
}

.status-processing {
    background: #e0e7ff;
    color: #6366f1;
}

.status-completed {
    background: #d1fae5;
    color: #22c55e;
}

.status-cancelled {
    background: #fee2e2;
    color: #ef4444;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #1e3454;
    transform: translateY(-1px);
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: transparent;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}

.btn-icon:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 20px;
    color: var(--border-color);
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 14px;
    margin: 0 0 24px 0;
}

/* Login Message */
.notary-dashboard-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    padding: 40px 20px;
}

.login-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    max-width: 400px;
}

.login-card svg {
    color: var(--primary-color);
    margin-bottom: 24px;
}

.login-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px 0;
}

.login-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 32px 0;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    max-width: 100% !important;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: var(--bg-light);
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-dark);
}

.modal-body {
    padding: 32px;
}

.modal-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Submission Details */
.submission-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.details-header h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--text-dark);
}

.details-date {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.details-section {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 24px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 20px 0;
}

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

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

.detail-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    color: var(--text-dark);
}

/* Documents List */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.document-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.document-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.document-info strong {
    font-size: 14px;
    color: var(--text-dark);
}

.document-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Payment Breakdown */
.payment-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-dark);
}

.payment-total {
    padding-top: 12px;
    border-top: 2px solid var(--border-color);
    font-size: 16px;
}

.payment-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
}

.payment-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.payment-id {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.payment-id code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-dark);
    background: var(--bg-light);
    padding: 4px 8px;
    border-radius: 4px;
}

.document-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .content-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .submissions-table {
        font-size: 13px;
    }
    
    .submissions-table th,
    .submissions-table td {
        padding: 12px 8px;
    }
    
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
}