:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --danger: #f72585;
    --dark: #1b263b;
    --light: #f8f9fa;
    --gray: #e0e1dd;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gradient-1: linear-gradient(135deg, #4361ee 0%, #3f37c9 100%);
    --gradient-2: linear-gradient(135deg, #4cc9f0 0%, #4895ef 100%);
    --gradient-3: linear-gradient(135deg, #f72585 0%, #b5179e 100%);
    --gradient-4: linear-gradient(135deg, #f8961e 0%, #f9c74f 100%);
    --warning: #f72585;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}



body {
    font-family: 'Outfit', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px;
}

/* Dashboard Layout */
.dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* Header Section */
.header-section {
    background: white;
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.page-title h1 {
    font-size: 1.5rem;
    color: var(--dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title i {
    color: var(--primary);
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border-radius: 12px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.9rem;
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-print,
.btn-primary {
    background: var(--gradient-1);
    color: white;
}

.btn-excel,
.btn-info {
    background: var(--gradient-2);
    color: white;
}

.btn-warning {
    background: var(--gradient-4);
    color: white;
}

.btn-danger {
    background: var(--gradient-3);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* KPI Filters Bar & Forms */
.filters-bar,
.form-section {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group,
.form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
    /* Override default margin if needed */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-section {
    flex-direction: column;
    align-items: stretch;
}

.filter-group label,
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-family: inherit;
    color: var(--dark);
    transition: border-color 0.3s;
    box-sizing: border-box;
    background: white;
    /* Ensure white background */
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* KPI Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.kpi-card {
    background: white;
    padding: 24px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s;
}

.kpi-card:hover {
    transform: translateY(-5px);
}

.kpi-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.1;
}

.kpi-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 10px 0;
    background: linear-gradient(45deg, var(--dark), var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.kpi-subtext {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Main Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* Generic Content Card */
.content-card,
.block-1 {
    background: white;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.card-header,
.header-with-settings {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.card-title,
.header-with-settings h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

/* Modern Table */
.table-container {
    max-width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: white;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background-color: #f8f9fa;
    color: #6c757d;
    font-weight: 600;
    padding: 15px;
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e9ecef;
}

td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
    color: #495057;
    font-weight: 500;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f8f9fa;
}

tr.selected td {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary);
}

/* Badge Styles */
.badge {
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.badge-positive {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge-negative {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.badge-neutral {
    background-color: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

/* Performers List */
.performer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    transition: transform 0.2s;
}

.performer-item:hover {
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transform: translateX(5px);
}

.performer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-section {
        flex-direction: column;
        align-items: stretch;
    }

    .action-buttons {
        flex-direction: column;
        margin-right: 0 !important;
    }

    .filters-bar,
    .form-section {
        flex-direction: column;
    }

    .filter-group,
    .form-group {
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Print Specifics */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .dashboard-container {
        display: block;
    }

    .filters-bar,
    .action-buttons,
    .btn {
        display: none;
    }

    .kpi-card,
    .content-card,
    .block-1 {
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 20px;
        break-inside: avoid;
    }

    .content-grid {
        display: block;
    }

    .kpi-value {
        -webkit-text-fill-color: black;
    }
}

/* Sidebar & Navigation (Added for Index/Panel) */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--primary);
    font-weight: 700;
}

.menu-list {
    list-style: none;
    padding: 0 15px;
    margin: 0;
    flex: 1;
}

.menu-item {
    margin-bottom: 8px;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.2s;
}

.menu-item a:hover {
    background-color: #f1f5f9;
    color: var(--primary);
    transform: translateX(5px);
}

.menu-item a.active {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

.menu-icon {
    width: 20px;
    text-align: center;
}

/* Main Content Wrapper */
.main-content {
    margin-left: 260px;
    padding: 0;
    height: 100vh;
    background-color: #f0f2f5;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #f0f2f5;
    background-image: radial-gradient(#4361ee 0.5px, #f0f2f5 0.5px);
    background-size: 20px 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h2 {
    color: var(--dark);
    font-weight: 700;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.login-box .form-control {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
}

.login-box .form-control:focus {
    background: white;
    border-color: var(--primary);
}

.btn-login {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: var(--gradient-1);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 20px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
}

.error-msg {
    color: var(--danger);
    background: rgba(247, 37, 133, 0.1);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* User Info Overlay */
.user-info {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 100;
    background: white;
    padding: 8px 12px 8px 20px;
    border-radius: 30px;
    box-shadow: var(--card-shadow);
}

.user-details {
    text-align: right;
}

.user-name {
    display: block;
    font-weight: 700;
    color: var(--dark);
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: #64748b;
}

.btn-logout {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(247, 37, 133, 0.1);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

/* Mobile Responsive */
.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background: white;
        color: var(--dark);
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        box-shadow: var(--card-shadow);
        cursor: pointer;
    }
}

/* Custom Utilities specific to giris.php adjustments */
.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group button.btn-small {
    padding: 0 15px;
    white-space: nowrap;
}

/* Mobile Navigation Bar */
.mobile-nav-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-bar .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-decoration: none;
    color: #64748b;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.mobile-nav-bar .nav-item i {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.mobile-nav-bar .nav-item.active {
    color: var(--primary);
}

.mobile-nav-spacer {
    display: none;
    height: 70px;
    /* Adjust based on nav bar height */
}

/* Show on mobile */
@media (max-width: 768px) {
    .mobile-nav-bar {
        display: flex;
    }

    .mobile-nav-spacer {
        display: block;
    }

    /* Adjust body padding if needed */
    body {
        padding: 10px;
        padding-bottom: 0;
    }

    .dashboard-container {
        gap: 15px;
        width: 100%;
    }

    .header-section,
    .form-section,
    .content-card {
        padding: 15px;
        width: 100%;
        margin: 0;
        border-radius: 15px;
    }
}