/**
 * PelautConnect Dashboard CSS
 */

/* ============ Layout ============ */
.plc-dashboard-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============ Tabs ============ */
.plc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 25px;
    padding-bottom: 0;
}

.plc-tab-link {
    padding: 10px 18px;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background: #f8f9fa;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.plc-tab-link:hover {
    background: #fff;
    color: #3498db;
}

.plc-tab-link.active {
    background: #fff;
    color: #3498db;
    border-color: #3498db;
    font-weight: 600;
    border-bottom: 2px solid #fff;
    margin-bottom: -2px;
}

/* ============ Cards & Panels ============ */
.plc-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    margin-bottom: 20px;
}

.plc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.plc-stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    border-top: 4px solid var(--stat-color, #3498db);
}

.plc-stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--stat-color, #3498db);
}

.plc-stat-card .stat-label {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* ============ Badges ============ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.badge-pending  { background: #fff3cd; color: #856404; }
.badge-replied  { background: #d4edda; color: #155724; }
.badge-closed   { background: #e2e3e5; color: #383d41; }
.badge-sent     { background: #cce5ff; color: #004085; }
.badge-accepted { background: #d4edda; color: #155724; }
.badge-rejected { background: #f8d7da; color: #721c24; }
.badge-draft    { background: #e2e3e5; color: #383d41; }

/* ============ Buttons ============ */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all .2s;
}

.btn-primary  { background: #3498db; color: white; }
.btn-primary:hover  { background: #2980b9; color: white; }
.btn-success  { background: #27ae60; color: white; }
.btn-success:hover  { background: #229954; color: white; }
.btn-danger   { background: #e74c3c; color: white; }
.btn-danger:hover   { background: #c0392b; color: white; }
.btn-secondary { background: #95a5a6; color: white; }
.btn-secondary:hover { background: #7f8c8d; color: white; }

/* ============ Forms ============ */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color .2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,.1);
}

/* ============ Alerts ============ */
.alert {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

.alert-info    { background: #d1ecf1; color: #0c5460; border-left: 4px solid #17a2b8; }
.alert-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid #ffc107; }
.alert-danger  { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3545; }

/* ============ Tables ============ */
.plc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.plc-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.plc-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.plc-table tr:hover td {
    background: #f8f9fa;
}

/* ============ Toggle Switch ============ */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    vertical-align: middle;
}

.toggle-switch input { display: none; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 26px;
    transition: .3s;
}

.toggle-slider:before {
    content: '';
    position: absolute;
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: .3s;
}

.toggle-switch input:checked + .toggle-slider { background: #27ae60; }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(22px); }

/* ============ Tier Badges ============ */
.tier-free     { background: #95a5a6; color: white; }
.tier-standard { background: #3498db; color: white; }
.tier-premium  { background: #9b59b6; color: white; }
.tier-pro      { background: #667eea; color: white; }

/* ============ Progress Bars ============ */
.progress-bar-wrap {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width .5s ease;
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .plc-tabs { overflow-x: auto; flex-wrap: nowrap; }
    .plc-stats-grid { grid-template-columns: 1fr 1fr; }
    .plc-tab-link { font-size: 12px; padding: 8px 12px; }
}

@media (max-width: 480px) {
    .plc-stats-grid { grid-template-columns: 1fr; }
}


/* ============================================================
   COMPANY DASHBOARD LAYOUT (class-plc-dashboard.php)
   ============================================================ */

.company-dashboard-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    min-height: 80vh;
    margin: 0 auto;
    background: #f4f6f9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Sidebar ---- */
.dashboard-sidebar {
    background: #1e2d3d;
    color: #cdd6e0;
    padding: 0;
    min-height: 100%;
    position: sticky;
    top: 0;
    align-self: start;
}

.company-info-card {
    padding: 28px 20px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.company-logo-sidebar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.15);
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.company-logo-sidebar.no-logo {
    background: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 10px;
}

.company-name-sidebar {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}

.company-tier-sidebar {
    margin-bottom: 12px;
}

.company-tier-sidebar .badge {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: .5px;
}

/* Profile completion bar in sidebar */
.profile-completion-bar {
    margin-top: 10px;
    text-align: left;
}

.profile-completion-label {
    font-size: 11px;
    color: #8fa3b1;
    margin-bottom: 4px;
}

.progress-bar-container {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    height: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #3498db;
    border-radius: 10px;
    transition: width .5s ease;
}

.progress-percentage {
    font-size: 11px;
    color: #8fa3b1;
    text-align: right;
    margin-top: 3px;
}

/* ---- Navigation ---- */
.dashboard-nav {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.dashboard-nav li {
    margin: 0;
}

.dashboard-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    color: #9fb3c0;
    text-decoration: none;
    font-size: 13.5px;
    transition: all .15s;
    border-left: 3px solid transparent;
    position: relative;
}

.dashboard-nav li a:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
    border-left-color: #3498db;
}

.dashboard-nav li a.active {
    background: rgba(52,152,219,0.15);
    color: #fff;
    border-left-color: #3498db;
    font-weight: 600;
}

.dashboard-nav .dashicons {
    font-size: 16px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: inherit;
}

.nav-badge {
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    min-width: 18px;
    text-align: center;
}

.nav-separator {
    border-top: 1px solid rgba(255,255,255,0.07);
    margin-top: 8px;
    padding-top: 8px;
}

.nav-separator a,
.dashboard-nav li:last-child a {
    color: #7a95a5;
    font-size: 12.5px;
}

/* ---- Main Content ---- */
.dashboard-content {
    padding: 28px 32px;
    min-height: 80vh;
    background: #f4f6f9;
}

.welcome-alert {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    padding: 18px 24px;
    border-radius: 10px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(52,152,219,0.3);
}

.welcome-alert h3 {
    margin: 0 0 6px;
    font-size: 17px;
    color: #fff;
}

.welcome-alert p {
    margin: 0;
    font-size: 14px;
    opacity: .9;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .company-dashboard-wrapper {
        grid-template-columns: 1fr;
    }
    .dashboard-sidebar {
        position: static;
    }
    .dashboard-nav {
        display: flex;
        flex-wrap: wrap;
        padding: 8px;
        gap: 4px;
    }
    .dashboard-nav li {
        flex: 1 1 auto;
    }
    .dashboard-nav li a {
        padding: 8px 12px;
        font-size: 12px;
        border-left: none;
        border-bottom: 3px solid transparent;
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 4px;
    }
    .dashboard-nav li a.active {
        border-bottom-color: #3498db;
        border-left-color: transparent;
    }
    .dashboard-content {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .dashboard-nav li a span.dashicons { display: none; }
    .nav-separator { display: none; }
}


.content-area {
  padding-top: 0 !important;
}

/* ============================================================
   OVERVIEW STATS CARDS (.stats-grid / .stat-card)
   class-plc-tab-overview.php
   ============================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border-left: 5px solid #3498db;
    transition: transform .15s, box-shadow .15s;
    position: relative;
    overflow: hidden;
}

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

.stat-card .stat-icon {
    font-size: 28px;
    margin-bottom: 10px;
    line-height: 1;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1e2d3d;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #7f8c8d;
    font-weight: 500;
}

/* Color variants */
.stat-card.blue   { border-left-color: #3498db; }
.stat-card.orange { border-left-color: #e67e22; }
.stat-card.green  { border-left-color: #2ecc71; }
.stat-card.purple { border-left-color: #9b59b6; }

.stat-card.blue   .stat-value { color: #2980b9; }
.stat-card.orange .stat-value { color: #d35400; }
.stat-card.green  .stat-value { color: #27ae60; }
.stat-card.purple .stat-value { color: #8e44ad; }

/* Decorative background circle */
.stat-card::after {
    content: '';
    position: absolute;
    right: -15px;
    top: -15px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.06;
    background: currentColor;
}

/* ---- data-table (Recent RFQs in Overview) ---- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: #f4f6f9;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}

.data-table tr:hover td {
    background: #f8f9fa;
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 16px 14px; }
    .stat-card .stat-value { font-size: 26px; }
}
