/* --- FIXED: Link is now on one single line --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap');

:root {
    /* --- THEME COLORS --- */
    --primary: #FF6D00;   /* Vibrant Orange */
    --secondary: #FF3D00; /* Deep Orange-Red */
    --bg-dark: #121212;   /* Almost Black background */
    --card-dark: #1e1e1e; /* Dark Grey card background */
    --text-white: #ffffff;
    --text-grey: #b0bec5;
    
    /* Status Colors */
    --success: #00C853; /* Green */
    --danger: #D50000;  /* Red */
    --info: #29b6f6;    /* Blue */
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    /* Black to Orange gradient background */
    background: linear-gradient(135deg, var(--bg-dark) 50%, #3e1c00 100%);
    min-height: 100vh; /* Changed to min-height so you can scroll on mobile */
    color: var(--text-white);
    overflow-x: hidden;
}

/* ========================================= */
/* --- 1. FLEXIBLE CONTAINER (TV/LAPTOP) --- */
/* ========================================= */
.container {
    width: 100%;             /* Occupy full width */
    max-width: 100%;         /* REMOVE LIMITS: Stretches to full TV size */
    margin: 30px auto;       
    padding: 0 40px;         /* Add padding so it doesn't touch the screen edges */
    box-sizing: border-box;  /* Ensures padding doesn't break layout */
    position: relative; 
    z-index: 2;
}

/* --- The Main Card (Login/General) --- */
.card {
    background: var(--card-dark);
    border-radius: 15px;
    border: 2px solid #333; /* Subtle dark border */
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); /* Strong shadow */
    animation: slideUp 0.6s ease-out;
}

/* --- LOGO STYLE (Round & Animated) --- */
.logo-img-link img, .logo-area img {
    height: 80px;          
    width: 80px;          
    object-fit: cover;    
    border-radius: 50%;   
    border: 3px solid var(--primary); 
    padding: 5px;         
    display: block;
    margin: 0 auto 20px auto; 
    animation: softPulse 3s infinite ease-in-out;
}

/* --- Headings & Text --- */
h1, h2, h3 {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center; 
}
p, label {
    color: var(--text-grey);
}

/* --- Inputs & Forms --- */
input, select, textarea {
    width: 100%; padding: 15px; margin: 10px 0;
    background: #2b2b2b; /* Dark input background */
    border: 2px solid #444; /* Dark grey border */
    border-radius: 8px; 
    color: var(--text-white); 
    outline: none; box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    transition: 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 109, 0, 0.2);
}

/* --- Buttons (Modified for Shape and Size) --- */
button, .btn {
    width: 100%; 
    padding: 12px; /* SIZE: Reduced from 15px to 12px to be sleeker */
    
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    border: none; 
    
    border-radius: 50px; /* SHAPE: Changed from 8px to 50px */
    
    color: var(--bg-dark); 
    font-weight: 800; 
    cursor: pointer; 
    text-align: center;
    text-decoration: none; 
    display: inline-block; 
    text-transform: uppercase;
    transition: 0.3s; /* Animation preserved */
}

/* ========================================= */
/* --- 2. SMART GRID (AUTO-RESIZE) --- */
/* ========================================= */
.stats-grid {
    display: grid;
    /* "Auto-fill" automatically calculates how many cards fit in a row */
    /* minmax(300px, 1fr) means: Cards are at least 300px wide, but stretch if there is space */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(145deg, #1e1e1e, #252525);
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid var(--primary); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 109, 0, 0.2); 
}

.stat-number {
    font-size: 2.5em;
    font-weight: 800;
    margin: 10px 0;
    color: white;
}

.stat-label {
    color: #888;
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 1px;
}

/* Specific Colors for specific cards */
.border-orange { border-left-color: #FF6D00; }
.border-blue { border-left-color: #2979FF; }
.border-green { border-left-color: #00C853; }
.border-red { border-left-color: #D50000; }

.stat-icon {
    position: absolute;
    right: 10px;
    bottom: 10px;
    font-size: 4em;
    opacity: 0.1; 
    color: white;
}

/* --- Dashboard Table --- */
table { 
    width: 100%; border-collapse: collapse; margin-top: 20px; 
    background: #2b2b2b; border-radius: 10px; overflow: hidden; border: 1px solid #444;
}
th, td { 
    padding: 15px; text-align: left; 
    border-bottom: 1px solid #444; color: var(--text-grey);
}
th { 
    background: #333; 
    color: var(--primary); 
    text-transform: uppercase; font-size: 0.9em;
}

/* --- STATUS BADGES --- */
.status-Solved { color: #000; background: var(--success); padding: 5px 10px; border-radius: 20px; font-size: 0.8em; font-weight:bold;}
.status-Pending { color: var(--bg-dark); background: var(--primary); padding: 5px 10px; border-radius: 20px; font-size: 0.8em; font-weight:bold;}
.status-Approved { color: var(--bg-dark); background: var(--info); padding: 5px 10px; border-radius: 20px; font-size: 0.8em; font-weight:bold;}

.status-Open { color: #fff; background: #FF6D00; padding: 5px 10px; border-radius: 20px; font-size: 0.8em; }
.status-Assigned { color: #000; background: #FFD700; padding: 5px 10px; border-radius: 20px; font-size: 0.8em; font-weight:bold; }
.status-WorkDone { color: #fff; background: #2979FF; padding: 5px 10px; border-radius: 20px; font-size: 0.8em; }

.status-PendingManager { 
    color: #000; 
    background: #B0BEC5; 
    padding: 5px 10px; 
    border-radius: 20px; 
    font-size: 0.8em; 
    font-weight: bold; 
}

/* Priorities */
.status-Critical { color: var(--text-white); background: var(--danger); padding: 5px 10px; border-radius: 20px; font-size: 0.8em; font-weight:bold; animation: pulseRed 1.5s infinite;}
.status-High { color: var(--primary); font-weight: bold; }
.status-Normal { color: var(--text-grey); }

/* --- Animations --- */
@keyframes slideUp { 
    from { opacity: 0; transform: translateY(50px); } 
    to { opacity: 1; transform: translateY(0); } 
}

@keyframes pulseRed { 
    0% { box-shadow: 0 0 0 0 rgba(213, 0, 0, 0.7); } 
    100% { box-shadow: 0 0 0 10px rgba(0,0,0,0); } 
}

@keyframes softPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 109, 0, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 109, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 109, 0, 0); }
}

/* --- EXIT BUTTON STYLE --- */
.btn-exit {
    display: block;            
    width: 100%;
    padding: 15px;
    margin-top: 15px;          
    background: transparent; 
    border: 2px solid #333;  
    color: #888;              
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    transition: 0.3s;
    box-sizing: border-box;
}

.btn-exit:hover {
    border-color: var(--primary); 
    color: var(--text-white);      
    background: rgba(255, 109, 0, 0.1); 
    transform: translateY(-2px);
}

/* ======================================================== */
/* --- VIEW TICKET SPECIFIC STYLES (Black Layer) --- */
/* ======================================================== */

/* 1. The Ticket Card Container (The Black Layer) */
.ticket-card {
    background-color: #1a1a1a; /* Darker than regular cards */
    border: 1px solid #333333; 
    border-radius: 12px;       
    padding: 25px;             
    margin-bottom: 20px;       
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); 
    color: var(--text-white);            
}

/* 2. Section Titles (e.g. REPORTER DETAILS) */
.section-title {
    color: var(--primary); /* Orange */
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-align: center;
}

/* 3. Small Labels (e.g. Reported By) */
.detail-label {
    color: #888888;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 5px;
    display: block;
}

/* 4. Main Values (e.g. DHIVASHINI) */
.detail-value {
    color: var(--text-white);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* 5. SPECIFIC: Make Service Type White */
.service-type-text {
    color: #ffffff !important; 
    font-weight: bold;
}

/* ========================================= */
/* --- 3. MOBILE & TV RESPONSIVENESS --- */
/* ========================================= */

/* FOR MOBILE (Screens smaller than 768px) */
@media screen and (max-width: 768px) {
    .container {
        padding: 0 15px; /* Smaller padding on phones */
    }
    
    .stats-grid {
        grid-template-columns: 1fr; /* Force 1 column on phone */
    }
    
    th, td {
        padding: 10px; /* Compress table for small screens */
        font-size: 0.85em;
    }
    
    .card {
        padding: 20px; /* Reduce card padding on phone */
    }
}