:root {
    --primary-color: #003256;
    --secondary-color: #004a7c;
    --fdic-gold: #FDB736;
    --text-color: #333333;
    --light-gray: #F5F5F5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 50px;
    border-radius: 6px;
    transition: transform 0.3s ease;
    object-fit: contain;
}

.logo:hover {
    transform: scale(1.05);
}

.header-text {
    flex-grow: 1;
}

h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.user-welcome {
    font-size: 0.95rem;
    opacity: 0.95;
    margin-top: 0.25rem;
}

.signout-btn {
    background-color: white;
    color: var(--primary-color);
    padding: 0.65rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.signout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

nav {
    background: var(--primary-color);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

nav a.active {
    background-color: var(--fdic-gold);
    color: var(--primary-color);
    font-weight: 600;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    flex: 1;
}

.page-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.btn-primary {
    background: var(--fdic-gold);
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.search-filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-filter-bar input,
.search-filter-bar select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-filter-bar input {
    flex: 1;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-scheduled {
    background-color: #E3F2FD;
    color: #1976D2;
}

.status-active {
    background-color: #E8F5E9;
    color: #388E3C;
}

.status-completed {
    background-color: #F5F5F5;
    color: #616161;
}

.status-cancelled {
    background-color: #FFEBEE;
    color: #C62828;
}

.window-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.window-table th {
    background: var(--primary-color);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.window-table th:hover {
    background: var(--secondary-color);
}

.window-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.window-table tr:hover {
    background-color: var(--light-gray);
}

.btn-action {
    padding: 6px 12px;
    margin: 0 4px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-view {
    background: #1976D2;
    color: white;
}

.btn-view:hover {
    background: #1565C0;
}

.btn-edit {
    background: var(--fdic-gold);
    color: var(--primary-color);
}

.btn-edit:hover {
    background: #FCA311;
}

.btn-cancel {
    background: #D32F2F;
    color: white;
}

.btn-cancel:hover {
    background: #C62828;
}

.btn-cancel:disabled,
.btn-edit:disabled {
    background: #ccc;
    cursor: not-allowed;
    color: #666;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
    font-weight: 500;
}

.btn-small:hover {
    opacity: 0.8;
}

.progress-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-left: 4px solid #FDB736;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    min-width: 350px;
    display: none;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.progress-notification.show {
    display: block;
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.progress-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #003256;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-header h4 {
    margin: 0;
    color: #003256;
    font-size: 1rem;
}

.progress-message {
    color: #666;
    font-size: 0.9rem;
    margin-left: 30px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: white;
    margin: 3% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.modal-content-wide {
    max-width: 1000px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

.close {
    background: rgba(255,255,255,0.15);
    border: none;
    font-size: 1.2rem;
    color: #ffffff;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close:hover { background: rgba(255,255,255,0.3); color: #fff; }

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--fdic-gold);
    box-shadow: 0 0 0 3px rgba(253, 183, 54, 0.1);
}

.form-group-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.info-box {
    background: #E3F2FD;
    border-left: 4px solid #1976D2;
    padding: 12px;
    margin: 1rem 0;
    border-radius: 4px;
}

.warning-box {
    background: #FFF3E0;
    border-left: 4px solid #F57C00;
    padding: 12px;
    margin: 1rem 0;
    border-radius: 4px;
}

.error-box {
    background: #FFEBEE;
    border-left: 4px solid #D32F2F;
    padding: 12px;
    margin: 1rem 0;
    border-radius: 4px;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.date-info {
    font-size: 0.85rem;
    color: #666;
}

.candidate-count {
    font-weight: 600;
    color: #1976D2;
}

.bulk-send-section {
    background-color: #f8f9fa;
    border: 2px solid #003256;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
}

.bulk-send-options {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.bulk-send-options button {
    flex: 1;
}

.link-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    background: white;
}

.link-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.link-card-candidate {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.link-card-contact {
    font-size: 0.9rem;
    color: #666;
    margin-top: 3px;
}

.link-card-url {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    word-break: break-all;
    margin: 10px 0;
}

.delivery-status {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    font-size: 0.9rem;
}

.delivery-status-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-sent {
    color: #28a745;
}

.status-not-sent {
    color: #999;
}

.link-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.link-card-actions button {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.section-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-card h3 {
    margin: 0 0 10px 0;
    color: #003256;
    border-bottom: 2px solid #FDB736;
    padding-bottom: 10px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
    font-size: 14px;
}

.details-grid strong {
    color: #003256;
}

.link-status-active { background: #e8f5e9; color: #388e3c; }
.link-status-used { background: #fff3e0; color: #f57c00; }
.link-status-expired { background: #ffebee; color: #c62828; }
.link-status-revoked { background: #f5f5f5; color: #616161; }

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #003256;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

footer {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

footer a {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-section {
        flex-direction: column;
    }

    .nav-content {
        flex-direction: column;
        align-items: center;
    }

    .container {
        padding: 1rem;
    }

    .form-group-inline {
        grid-template-columns: 1fr;
    }

    .bulk-send-options {
        flex-direction: column;
    }

    .link-card-actions {
        flex-direction: column;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }
}
