/* * AGOOD Corporate Panel - Master Stylesheet
 * Focus: High-Contrast Sidebar & Scalable Content Area
 */

:root {
    --agc-primary: #0056b3; /* Default, overridden by dynamic branding */
    --agc-sidebar-bg: #ffffff;
    --agc-text-dark: #1a1a1a;
    --agc-text-muted: #7f8c8d;
}

/* --- Premium Staff Login Styles --- */
.agc-premium-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh; /* Adjust based on Elementor layout */
    padding: 20px;
}

.agc-login-card {
    /* Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 50px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.agc-login-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 20px 0 10px;
    color: var(--agc-text-dark); /* Fallback to dark text */
}

.agc-login-header p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 40px;
}

/* Input Fields - High Contrast */
.agc-input-field {
    text-align: left;
    margin-bottom: 25px;
}

.agc-input-field label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--agc-text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agc-input-field input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.agc-input-field input:focus {
    outline: none;
    border-color: var(--agc-primary);
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.1);
}

/* Button - Premium Branding */
.agc-login-btn {
    width: 100%;
    padding: 16px;
    background: var(--agc-primary);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    margin-top: 10px;
}

.agc-login-btn:hover {
    opacity: 0.95;
    transform: translateY(-2px);
}

/* Alerts */
.agc-login-alert {
    background: #ffebed;
    color: #d63031;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 30px;
    font-size: 0.85rem;
    border-left: 5px solid #d63031;
}

/* Options & Footer */
.agc-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 0.85rem;
}

.agc-forgot-link {
    color: var(--agc-primary);
    text-decoration: none;
    font-weight: 600;
}

.agc-login-footer {
    margin-top: 40px;
    font-size: 0.75rem;
    color: #888;
}

/* --- 1. Staff Portal Layout Container --- */
.agc-portal-container {
    display: flex;
    min-height: 90vh;
    background: #f8fafc;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- 2. Sidebar Architecture --- */
.agc-sidebar {
    width: 280px;
    background: var(--agc-sidebar-bg) !important;
    border-right: 1px solid #eef2f5;
    display: flex;
    flex-direction: column;
    padding: 40px 0;
    flex-shrink: 0;
}

.agc-sidebar-brand {
    padding: 0 30px 40px;
    text-align: center;
    border-bottom: 1px solid #f8f9fa;
}

.sidebar-logo {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* --- 3. Sidebar Navigation (Fixing Visibility) --- */
.agc-sidebar-menu {
    flex-grow: 1;
    padding: 30px 0;
}

.agc-sidebar-menu ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Specificity override to force dark text on white background */
.agc-portal-container .agc-sidebar .agc-sidebar-menu ul li a {
    display: flex;
    align-items: center;
    padding: 18px 30px;
    text-decoration: none !important;
    color: var(--agc-text-dark) !important; /* Forces Visibility on A tag */
    font-weight: 700 !important;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

/* THE FIX: Force the text INSIDE the link (the span) to be dark */
.agc-portal-container .agc-sidebar .agc-sidebar-menu ul li a span.label {
    color: var(--agc-text-dark) !important;
    visibility: visible !important;
}

/* THE FIX: Force the icon to also be visible */
.agc-portal-container .agc-sidebar .agc-sidebar-menu ul li a span.icon {
    color: var(--agc-text-dark) !important;
    margin-right: 15px;
    font-size: 1.2rem;
}

/* Hover & Active States */
.agc-sidebar-menu ul li.active a,
.agc-sidebar-menu ul li a:hover {
    background: rgba(0, 86, 179, 0.05);
    color: var(--agc-primary) !important;
    border-left: 4px solid var(--agc-primary);
}

.agc-sidebar-menu ul li.active a span.label,
.agc-sidebar-menu ul li a:hover span.label,
.agc-sidebar-menu ul li.active a span.icon,
.agc-sidebar-menu ul li a:hover span.icon {
    color: var(--agc-primary) !important;
}

.agc-sidebar-menu li.disabled a {
    opacity: 0.3;
    cursor: not-allowed;
}

/* --- 4. Sidebar Footer & User Info --- */
.agc-sidebar-footer {
    padding: 25px 30px;
    background: #fcfdfe;
    border-top: 1px solid #f1f4f6;
}

.user-name {
    display: block !important;
    font-weight: 800 !important;
    color: #000000 !important; /* Pure Black */
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.user-role {
    font-size: 0.7rem;
    color: var(--agc-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.logout-btn {
    display: block;
    text-align: center;
    padding: 10px;
    background: #fff0f0;
    color: #d32f2f !important;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: #ffe5e5;
}

/* --- 5. Main Content Area --- */
.agc-main-content {
    flex-grow: 1;
    padding: 50px;
    background: #ffffff;
    overflow-y: auto;
}

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

.agc-content-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--agc-text-dark);
    margin: 0;
}

/* --- 6. Professional Data Table --- */
.agc-card-table-wrapper {
    background: #fff;
    border: 1px solid #eef2f5;
    border-radius: 12px;
    padding: 5px;
}

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

.agc-directory-table th {
    text-align: left;
    padding: 20px;
    background: #fbfcfd;
    border-bottom: 2px solid #f1f4f6;
    color: var(--agc-text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.agc-directory-table td {
    padding: 20px;
    border-bottom: 1px solid #f8f9fa;
    color: #444;
}

.agc-directory-table tr:last-child td {
    border-bottom: none;
}

/* Status Pills */
.status-badge {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.pending { background: #fff8e1; color: #f57f17; }
.status-badge.approved { background: #e8f5e9; color: #2e7d32; }

.view-link {
    text-decoration: none;
    color: var(--agc-primary);
    font-weight: 800;
    font-size: 0.85rem;
}

.view-link:hover {
    text-decoration: underline;
}

/* --- 7. ACCORDION TABLE STYLES --- */

/* The Clickable Main Row */
.agc-accordion-trigger {
    cursor: pointer;
    transition: background 0.2s ease;
}

.agc-accordion-trigger:hover {
    background: #f8fafc;
}

/* Fix bottom border when expanded so it connects visually to the details */
.agc-accordion-trigger.is-expanded td {
    border-bottom: none !important; 
}

/* The Arrow Icon */
.company-name-cell {
    display: flex;
    align-items: center;
}

.toggle-icon {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--agc-primary);
    margin-right: 12px;
    transition: transform 0.2s ease;
}

/* The Hidden Details Row */
.agc-accordion-details td.agc-details-cell {
    padding: 0 20px 20px 20px !important; /* Removes top padding to merge with above row */
    background: #ffffff;
    border-bottom: 2px solid #e2e8f0;
}

/* The Details Grid Layout */
.agc-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: #f8fafc;
    border: 1px solid #eef2f5;
    border-radius: 8px;
    padding: 25px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.detail-group.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.detail-value {
    display: block;
    font-size: 0.9rem;
    color: #1a1a1a;
    font-weight: 600;
}