/* Sandesham Reporter Portal Styles - Modern Admin Overhaul */

/* --- Variables --- */
:root {
    --primary-color: #D32F2F;
    /* Red branding */
    --primary-hover: #B71C1C;
    --sidebar-bg: #1e1e2d;
    /* Dark Sidebar */
    --sidebar-text: #a6a6b7;
    --sidebar-active: #ffffff;
    --bg-color: #f5f6fa;
    /* Light Page BG */
    --card-bg: #ffffff;
    --text-color: #333;
    --border-color: #e0e0e0;
}

/* --- Layout Wrappers --- */
.srp-dashboard-container {
    display: flex;
    flex-wrap: wrap;
    min-height: 600px;
    background: var(--bg-color);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;

    /* Force Full Width Breakout */
    width: 99vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -49.5vw;
    margin-right: -49.5vw;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* --- Sidebar --- */
.srp-tabs-nav {
    flex: 0 0 250px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.srp-tabs-nav a {
    display: block;
    padding: 15px 25px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.srp-tabs-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--sidebar-active);
}

.srp-tabs-nav a.active {
    background: rgba(200, 47, 47, 0.1);
    color: var(--sidebar-active);
    border-left-color: var(--primary-color);
}

.srp-tabs-nav a i {
    margin-right: 10px;
    width: 20px;
}

/* --- Main Content --- */
.srp-tab-content {
    flex: 1;
    padding: 30px;
    background: #f5f6fa;
    min-width: 0;
    /* Prevent overflow issues */
}

.srp-tab-content h2,
.srp-tab-content h3 {
    margin-top: 0;
    color: #2c3e50;
}

/* --- Stats Grid --- */
.srp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #ddd;
}

.stat-card.pending {
    border-left-color: #f6c23e;
}

.stat-card.published {
    border-left-color: #1cc88a;
}

.stat-card.users {
    border-left-color: #36b9cc;
}

.stat-card h3 {
    font-size: 14px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.stat-card .count {
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

/* --- Tables --- */
.srp-table.full-width {
    width: 100%;
    margin-top: 0;
    border-radius: 8px;
    overflow: hidden;
    border: none;
}

.srp-table th {
    background: #f8f9fc;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e3e6f0;
}

.srp-table td {
    vertical-align: middle;
    font-size: 14px;
}

.srp-table tr:hover td {
    background-color: #fcfcfc;
}

/* --- Badges --- */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.badge.publish {
    background: #d4edda;
    color: #155724;
}

.badge.pending {
    background: #fff3cd;
    color: #856404;
}

.badge.draft {
    background: #e2e3e5;
    color: #383d41;
}

/* --- Buttons --- */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    background: #eef2f7;
    color: #555;
    transition: 0.2s;
    margin-right: 4px;
    font-weight: 600;
}

.btn-sm:hover {
    background: #dfe4ea;
    color: #333;
}

.btn-green {
    background: #e6fffa;
    color: #2d998b;
}

.btn-green:hover {
    background: #b2f5ea;
    color: #285e61;
}

.btn-red {
    background: #fff5f5;
    color: #e53e3e;
}

.btn-red:hover {
    background: #fed7d7;
    color: #9b2c2c;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

/* --- Forms (Inline & General) --- */
.srp-card-box {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.srp-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.srp-inline-form input[type="text"],
.srp-inline-form input[type="email"],
.srp-inline-form input[type="password"],
.srp-inline-form select {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fcfcfc;
}

.full-width {
    width: 100%;
    margin-bottom: 15px;
}

/* --- Messages --- */
.srp-success,
.srp-error {
    margin: 0 0 20px;
    padding: 15px;
    border-radius: 4px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .srp-dashboard-container {
        flex-direction: column;
    }

    .srp-tabs-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0;
    }

    .srp-tabs-nav a {
        padding: 15px;
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .srp-tabs-nav a.active {
        border-left: none;
        border-bottom-color: var(--primary-color);
    }

    .srp-inline-form {
        flex-direction: column;
    }

    .srp-inline-form input,
    .srp-inline-form select {
        width: 100%;
    }
}