/* Dashboard Styles */
.dashboard-iframe-container {
    padding: 0;
    margin: 0;
    min-height: calc(100vh - 140px); /* Adjust based on header and footer height */
    position: relative;
}

#dashboard-iframe {
    width: 100%;
    height: calc(100vh - 140px); /* Full viewport height minus header/footer */
    min-height: 600px;
    border: none;
    display: block;
}

.dashboard-hero {
    background: linear-gradient(135deg, #0F2A4B 0%, #1a3d5c 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.dashboard-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.dashboard-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.dashboard-stats {
    padding: 60px 0;
    background: #f8fafc;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0F2A4B, #1a3d5c);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

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

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #0F2A4B;
    margin: 0 0 0.5rem 0;
}

.stat-content p {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
}

.quick-actions {
    padding: 60px 0;
}

.quick-actions h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #0F2A4B;
}

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

.action-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #0F2A4B;
}

.action-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0F2A4B, #1a3d5c);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1.5rem;
}

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

.action-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0F2A4B;
    margin: 0 0 0.5rem 0;
}

.action-card p {
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.recent-activity {
    padding: 60px 0;
    background: #f8fafc;
}

.recent-activity h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #0F2A4B;
}

.activity-list {
    max-width: 800px;
    margin: 0 auto;
}

.activity-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0F2A4B;
    flex-shrink: 0;
}

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

.activity-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #0F2A4B;
    margin: 0 0 0.25rem 0;
}

.activity-content p {
    color: #64748b;
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.activity-time {
    color: #94a3b8;
    font-size: 0.8rem;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-menu-btn {
    background: none;
    border: none;
    color: #0F2A4B;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.user-menu-btn:hover {
    background: #f1f5f9;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.user-dropdown:hover .user-dropdown-menu {
    display: block;
}

.user-dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #0F2A4B;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.user-dropdown-menu a:hover {
    background: #f1f5f9;
}

/* Error and Success Modals */
.error-modal, .success-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.error-content, .success-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.error-close, .success-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.error-close:hover, .success-close:hover {
    color: #000;
}

.error-content h3 {
    color: #dc2626;
    margin: 0 0 1rem 0;
}

.success-content h3 {
    color: #059669;
    margin: 0 0 1rem 0;
}

.error-content p, .success-content p {
    margin: 0;
    line-height: 1.5;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-iframe-container {
        min-height: calc(100vh - 120px); /* Adjust for mobile header */
    }

    #dashboard-iframe {
        height: calc(100vh - 120px);
        min-height: 500px;
    }

    .dashboard-hero h1 {
        font-size: 2rem;
    }

    .dashboard-hero p {
        font-size: 1rem;
    }

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

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

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .activity-item {
        flex-direction: column;
        text-align: center;
    }

    .user-dropdown-menu {
        right: -50px;
    }
}
