/**
 * Ethernet Platform - Main Stylesheet
 * Based on örnek/index.php design
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #f97316;
    --secondary: #ea580c;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --dark-secondary: #1e293b;
    --dark-tertiary: #334155;
    --light: #f8fafc;
    --gray: #94a3b8;
    --white: #ffffff;
    --sidebar-width: 220px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 0.875rem;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* Left Sidebar - Kaydırılabilir Menü */
.left-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--dark-secondary);
    border-right: 1px solid var(--dark-tertiary);
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.left-sidebar::-webkit-scrollbar {
    width: 6px;
}

.left-sidebar::-webkit-scrollbar-track {
    background: var(--dark);
}

.left-sidebar::-webkit-scrollbar-thumb {
    background: var(--dark-tertiary);
    border-radius: 3px;
}

.sidebar-logo {
    padding: 1.5rem 1.125rem;
    border-bottom: 1px solid var(--dark-tertiary);
    text-align: center;
}

.sidebar-logo h1 {
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.sidebar-logo h1 .emoji {
    font-style: normal;
    background: none;
    -webkit-text-fill-color: initial;
    background-clip: initial;
}

.sidebar-logo h1 .text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-menu {
    list-style: none;
    padding: 0.75rem 0;
}

.sidebar-menu li {
    margin-bottom: 0.1875rem;
}

.sidebar-menu a {
    display: block;
    padding: 0.75rem 1.125rem;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 2px solid transparent;
    font-size: 0.875rem;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--dark-tertiary);
    border-left-color: var(--primary);
}

.sidebar-menu a {
    display: flex;
    align-items: center;
}

.sidebar-menu .menu-icon {
    font-size: 1.1em;
    margin-right: 0.5rem;
    display: inline-block;
    width: 1.5em;
    text-align: center;
    transition: transform 0.2s;
}

.sidebar-menu .menu-label {
    flex: 1;
    color: var(--gray);
    transition: color 0.3s;
}

.sidebar-menu a:hover .menu-label,
.sidebar-menu a.active .menu-label {
    color: var(--white);
}

.sidebar-menu a:hover .menu-icon,
.sidebar-menu a.active .menu-icon {
    transform: scale(1.1);
}

.sidebar-menu .menu-points {
    float: right;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: bold;
}

.menu-separator {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--dark-tertiary);
}

.menu-admin {
    color: var(--primary);
}

.sidebar-user-info {
    position: relative;
    padding: 1rem;
    margin: 1rem;
    margin-top: auto;
    background: var(--dark);
    border: 1px solid var(--dark-tertiary);
    border-radius: 10px;
}

.sidebar-user-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
}

.sidebar-user-details {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-points {
    font-size: 0.75rem;
    color: var(--gray);
}

.sidebar-user-points span {
    color: var(--primary);
    font-weight: bold;
}

@media (max-width: 1024px) {
    .sidebar-user-info {
        margin: 1rem;
    }
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    background: var(--dark);
    position: relative;
    overflow: visible;
    padding-top: 0;
    z-index: 0;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(249, 115, 22, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(234, 88, 12, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(249, 115, 22, 0.05) 0%, transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.main-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 60% 30%, rgba(234, 88, 12, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 30% 70%, rgba(249, 115, 22, 0.07) 0%, transparent 50%);
    animation: backgroundMove 25s ease-in-out infinite reverse;
    pointer-events: none;
    z-index: 0;
}

@keyframes backgroundMove {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.8;
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.9;
    }
}

/* Main content içindeki öğeler - sadece gerekli olanlara z-index ver */
.main-content > section,
.main-content > .section {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    overflow: visible;
}

.main-content > .container:first-of-type {
    padding-top: 0;
}

/* Header */
header {
    background: var(--dark-secondary);
    border-bottom: 1px solid var(--dark-tertiary);
    padding: 1.125rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    isolation: isolate;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.125rem;
    position: relative;
    overflow: visible;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-logo {
    font-size: 1.125rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Social Media Links */
.social-links {
    display: flex;
    gap: 0.5625rem;
    list-style: none;
}

.social-links a {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--dark-tertiary);
    color: var(--gray);
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.social-links a svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.social-links a.telegram:hover { background: #0088cc; }
.social-links a.instagram:hover { background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); }
.social-links a.twitter:hover { background: #1da1f2; }
.social-links a.youtube:hover { background: #ff0000; }
.social-links a.kick:hover { background: #53fc18; }

/* User Actions */
.user-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1001;
    isolation: isolate;
}

.user-points {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--dark-tertiary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.user-points span:first-child {
    color: var(--primary);
    font-weight: bold;
}

.user-points span:last-child {
    color: var(--gray);
    font-size: 0.75rem;
}

.user-avatar {
    position: relative;
    z-index: 1002;
}

.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--primary);
    object-fit: cover;
}

.user-menu {
    display: none;
    position: fixed;
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    z-index: 1003;
    pointer-events: auto;
    overflow: visible;
    isolation: isolate;
}

.user-menu.open {
    display: block;
}

.user-menu-header {
    padding: 1rem;
    border-bottom: 1px solid var(--dark-tertiary);
}

.user-menu-name {
    font-weight: bold;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.user-menu-username {
    font-size: 0.75rem;
    color: var(--gray);
}

.user-menu-points {
    font-size: 0.75rem;
    color: var(--primary);
    margin-top: 0.5rem;
}

.user-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--gray);
    text-decoration: none;
    transition: all 0.3s;
}

.user-menu a:hover {
    background: var(--dark-tertiary);
    color: var(--white);
}

.user-menu-separator {
    border-top: 1px solid var(--dark-tertiary);
}

.user-menu-danger {
    color: var(--danger);
}

.user-menu-danger:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.btn {
    padding: 0.5625rem 1.125rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.675rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 9px rgba(249, 115, 22, 0.4);
}

.btn-secondary {
    background: var(--dark-tertiary);
    color: var(--white);
    border: 1px solid var(--dark-tertiary);
}

.btn-secondary:hover {
    background: var(--dark-tertiary);
    border-color: var(--primary);
}

.btn svg {
    width: 13.5px;
    height: 13.5px;
    fill: currentColor;
}

/* Main Content */
main {
    padding: 2.25rem 0;
}

.section {
    margin-bottom: 3rem;
}

/* Marquee Animation */
.marquee-section {
    margin-bottom: 3rem;
    overflow: hidden;
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: 12px;
    padding: 1.75rem 0 1.5rem 0;
}

.marquee {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding-top: 6px;
}

.marquee-container {
    display: flex;
    gap: 2rem;
}

.marquee-wrapper {
    display: flex;
    animation: scroll 40s linear infinite;
    gap: 2rem;
    will-change: transform;
    padding: 0;
}

.marquee-wrapper .item,
.marquee-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
    background: var(--dark);
    border-radius: 8px;
    transition: all 0.3s;
    text-decoration: none;
    border: 1px solid transparent;
    min-width: 150px;
    position: relative;
}

.marquee-wrapper .item:hover,
.marquee-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

.marquee-wrapper .item img,
.marquee-item img {
    height: 50px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    display: block;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100% / 2));
    }
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    position: relative;
    padding-left: 0.75rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 1.5px;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--white);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 9px 18px rgba(249, 115, 22, 0.2);
}

.card-image-container {
    width: 100%;
    height: 150px;
    background: var(--dark-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.card-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    object-position: center;
    background: var(--dark-tertiary);
    display: block;
}

/* Sponsor kartlarındaki logoları %10 küçült */
#sponsors .card-image,
#sponsors-container .card-image,
#sponsors .card-image-container {
    height: 85px;
}

.card-body {
    padding: 1.125rem;
}

.card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--white);
}

.card-text {
    color: var(--gray);
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
}

.badge {
    display: inline-block;
    padding: 0.1875rem 0.5625rem;
    border-radius: 15px;
    font-size: 0.65625rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.badge-featured {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0.375rem 0;
    font-size: 0.8125rem;
}

.stars {
    color: #fbbf24;
    font-size: 0.8125rem;
}

/* Two Column Grid */
.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Bonus List */
.bonus-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bonus-item {
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    transition: all 0.3s;
}

.bonus-item:hover {
    border-color: var(--primary);
    transform: translateX(6px);
}

.bonus-sponsor-logo {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    border-radius: 8px;
    overflow: hidden;
}

.bonus-sponsor-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bonus-info {
    flex: 1;
}

.bonus-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.bonus-title a {
    color: var(--white);
    text-decoration: none;
}

.bonus-title a:hover {
    color: var(--primary);
}

.bonus-description {
    color: var(--gray);
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

.bonus-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.bonus-type {
    font-size: 0.75rem;
}

.bonus-cost {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8125rem;
}

.bonus-amount {
    color: var(--success);
    font-weight: 600;
    font-size: 0.8125rem;
}

/* News List */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news-item {
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    gap: 1rem;
    text-decoration: none;
    transition: all 0.3s;
}

.news-item:hover {
    border-color: var(--primary);
    transform: translateX(6px);
}

.news-image {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    object-fit: cover;
    background: var(--dark-tertiary);
}

.news-info {
    flex: 1;
    padding: 1rem;
}

.news-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.news-excerpt {
    color: var(--gray);
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

.news-meta {
    display: flex;
    gap: 1rem;
    color: var(--gray);
    font-size: 0.75rem;
}

/* Leaderboard */
.leaderboard,
.leaderboard-list {
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: 12px;
    padding: 1.5rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: var(--dark);
    border-radius: 9px;
    margin-bottom: 0.75rem;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.leaderboard-item:hover {
    transform: translateX(6px);
    border-color: var(--primary);
}

.leaderboard-item.current-user-highlight {
    border-color: var(--primary);
    background: rgba(249, 115, 22, 0.1);
}

.leaderboard-rank {
    font-size: 1.125rem;
    font-weight: bold;
    color: var(--primary);
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.leaderboard-avatar {
    width: 37.5px;
    height: 37.5px;
    border-radius: 50%;
    margin: 0 0.75rem;
    flex-shrink: 0;
}

.leaderboard-user-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.leaderboard-username {
    font-weight: 600;
    color: var(--white);
    font-size: 0.875rem;
}

.leaderboard-points {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.875rem;
}

/* Footer */
footer {
    background: var(--dark-secondary);
    border-top: 1px solid var(--dark-tertiary);
    padding: 2.25rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(187.5px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    margin-bottom: 0.75rem;
    color: var(--white);
    font-size: 1.125rem;
}

.footer-section a {
    color: var(--gray);
    text-decoration: none;
    display: block;
    margin-bottom: 0.375rem;
    transition: color 0.3s;
    font-size: 0.8125rem;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.footer-social a {
    width: 33.75px;
    height: 33.75px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7.5px;
    background: var(--dark-tertiary);
    color: var(--gray);
    transition: all 0.3s;
}

.footer-social a:hover {
    transform: translateY(-2px);
}

.footer-social a svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--dark-tertiary);
    color: var(--gray);
    font-size: 0.8125rem;
}

.footer-debug {
    font-size: 0.7rem;
    margin-top: 0.5rem;
    color: var(--gray);
}

.header-logo a {
    text-decoration: none;
    color: inherit;
}

.sidebar-logo h1 a {
    text-decoration: none;
    color: inherit;
}

/* Loading Spinner */
.loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 4px solid rgba(249, 115, 22, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--light);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

/* Flash Messages */
.flash-message {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: var(--dark-secondary);
    border-left: 4px solid var(--primary);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

.flash-success {
    border-left-color: var(--success);
}

.flash-error,
.flash-danger {
    border-left-color: var(--danger);
}

.flash-warning {
    border-left-color: var(--warning);
}

.flash-info {
    border-left-color: #3b82f6;
}

.maintenance-box {
    text-align: center;
    padding: 2rem;
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: 12px;
    color: var(--white);
    margin: 2rem auto;
    max-width: 640px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
    .left-sidebar {
        transform: translateX(-100%);
    }

    .left-sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .menu-toggle {
        display: block;
    }

    .two-column-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1025px) {
    .menu-toggle {
        display: none;
    }
}

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

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

/* =============================================
   FORM STYLES
   ============================================= */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray);
    font-size: 0.875rem;
    font-weight: 600;
}

.form-label .required {
    color: var(--danger);
    margin-left: 0.25rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: 8px;
    color: var(--white);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
    background: var(--dark);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.form-help {
    margin-top: 0.5rem;
    color: var(--gray);
    font-size: 0.75rem;
}

.form-error {
    margin-top: 0.5rem;
    color: var(--danger);
    font-size: 0.75rem;
}

.form-checkbox,
.form-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"],
.form-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* =============================================
   BUTTON VARIANTS
   ============================================= */

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

.btn-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.btn-success:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: translateY(-2px);
}

.btn-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.btn-warning:hover {
    background: rgba(245, 158, 11, 0.2);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* =============================================
   BREADCRUMB
   ============================================= */

.breadcrumb-container {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.breadcrumb {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb li {
    color: var(--gray);
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb li:last-child {
    color: var(--white);
}

/* =============================================
   PAGINATION
   ============================================= */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s;
    display: inline-block;
}

.pagination a {
    background: var(--dark-secondary);
    color: var(--gray);
    border: 1px solid var(--dark-tertiary);
}

.pagination a:hover {
    background: var(--dark-tertiary);
    color: var(--white);
    border-color: var(--primary);
}

.pagination .current,
.pagination .active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    font-weight: 600;
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* =============================================
   TABLES
   ============================================= */

.table-container {
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: 12px;
    overflow: hidden;
}

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

.table thead {
    background: var(--dark);
}

.table th {
    padding: 1rem;
    text-align: left;
    color: var(--gray);
    font-size: 0.875rem;
    font-weight: 600;
    border-bottom: 1px solid var(--dark-tertiary);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--dark-tertiary);
    color: var(--white);
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background: var(--dark);
}

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

/* =============================================
   BADGE VARIANTS
   ============================================= */

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.badge-primary {
    background: rgba(249, 115, 22, 0.2);
    color: var(--primary);
    border: 1px solid var(--primary);
}

/* =============================================
   UTILITY CLASSES
   ============================================= */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

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

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-gray {
    color: var(--gray);
}

.text-white {
    color: var(--white);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* =============================================
   FILE UPLOAD
   ============================================= */

.file-upload-area {
    border: 2px dashed var(--dark-tertiary);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background: var(--dark-secondary);
    transition: all 0.3s;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: var(--dark);
}

.file-upload-area.dragover {
    border-color: var(--primary);
    background: rgba(249, 115, 22, 0.1);
}

.file-upload-input {
    display: none;
}

.file-upload-label {
    display: block;
    cursor: pointer;
}

.file-upload-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.file-upload-text {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.file-upload-hint {
    color: var(--gray);
    font-size: 0.75rem;
}

.image-preview {
    margin-top: 1rem;
    max-width: 300px;
}

.image-preview img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--dark-tertiary);
}

/* =============================================
   EMPTY STATE
   ============================================= */

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

/* =============================================
   STATS CARDS
   ============================================= */

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

.stat-card {
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

.stat-label {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-change {
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

/* =============================================
   MODAL
   ============================================= */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 9999;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--dark-tertiary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--dark-tertiary);
    color: var(--white);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--dark-tertiary);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* =============================================
   TABS
   ============================================= */

.tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--dark-tertiary);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--gray);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    bottom: -1px;
}

.tab:hover {
    color: var(--white);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* =============================================
   PROGRESS BAR
   ============================================= */

.progress {
    width: 100%;
    height: 8px;
    background: var(--dark-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* =============================================
   TOOLTIP
   ============================================= */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    position: absolute;
    background: var(--dark);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid var(--dark-tertiary);
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--dark);
}

/* =============================================
   ADDITIONAL RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .two-column-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab {
        white-space: nowrap;
    }
}
