/* ========================================
   🛡️ ADMIN PORTAL SCREEN - CLAYMORPHISM
   File: css/admin-portal.css
   Theme: Warm clay colors with soft shadows
======================================== */

.admin-screen {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    
    background: linear-gradient(180deg, rgba(255, 250, 247, 0.98) 0%, rgba(245, 241, 232, 0.98) 100%);
    
    
    transform: translate3d(0, 100%, 0);
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
    
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    box-shadow: 0 -15px 50px rgba(180, 120, 80, 0.2);
        
    z-index: 1060;
    
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Active State */
.admin-screen.active {
    transform: translate3d(0, 0, 0);
}

/* --- HEADER (Claymorphism) --- */
.admin-header {
    height: 76px;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, rgba(255, 248, 243, 0.95) 0%, rgba(244, 199, 168, 0.08) 100%);
    border-bottom: 1px solid rgba(212, 145, 125, 0.15);
    flex-shrink: 0;
}

/* Title Area */
.admin-title-box {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #4A4A4A;
}

.admin-title-box i { 
    font-size: 20px; 
    color: #D4917D; 
}

.admin-title-box h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #4A4A4A;
}

/* --- BUTTONS (Claymorphism) --- */
.admin-actions {
    display: flex;
    align-items: center;
}

.btn-admin-logout i { color: #D4917D; }

.btn-admin-logout:hover {
    background: rgba(255, 250, 247, 0.98);
    border-color: #D4917D;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(212, 145, 125, 0.2);
}

.btn-admin-logout:active { transform: scale(0.98); }

/* Close Button (Claymorphism) */
.btn-admin-close {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255, 250, 247, 0.9);
    color: #B8927E;
    border: 1px solid rgba(212, 145, 125, 0.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(212, 145, 125, 0.1);
    transition: all 0.2s ease;
}

.btn-admin-close:hover { 
    color: #D4917D; background: rgba(255, 250, 247, 0.98);
    border-color: #D4917D; transform: rotate(90deg); 
}

/* --- CONTENT AREA --- */
.admin-content {
    flex: 1;
    display: flex; 
    flex-direction: column;
    overflow: hidden; 
    align-items: center;
    padding: 20px;
    padding-top: 0;
    background: transparent; 
}

.admin-placeholder {
    text-align: center;
    color: #B8927E;
}
.admin-placeholder i { font-size: 64px; opacity: 0.25; margin-bottom: 24px; display: block; color: #D4917D; }
.admin-placeholder p { font-size: 16px; font-weight: 500; letter-spacing: 0.5px; color: #4A4A4A; }


/* ========================================
   🔐 LOGIN MODAL (CLAYMORPHISM)
======================================== */
.login-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 1070;
    display: none;
    align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.login-overlay.visible { display: flex; opacity: 1; }

.login-card {
    background: rgba(255, 250, 247, 0.98);
    width: 85%; max-width: 320px;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(180, 120, 80, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.login-overlay.visible .login-card { transform: scale(1); }

.login-header { text-align: center; margin-bottom: 20px; }
.login-header i { font-size: 32px; color: #D4917D; margin-bottom: 10px; display: block; }
.login-header h3 { margin: 0; font-size: 18px; font-weight: 700; color: #4A4A4A; letter-spacing: 0.5px; }

.login-body p { text-align: center; color: #7A7A7A; font-size: 13px; margin-bottom: 20px; }

.input-group-gold { position: relative; margin-bottom: 24px; }
.input-group-gold input {
    width: 100%; padding: 12px 16px; padding-right: 40px;
    border: 1px solid rgba(212, 145, 125, 0.2); border-radius: 12px;
    font-size: 16px; outline: none; transition: all 0.2s;
    background: rgba(255, 250, 247, 0.9);
    color: #4A4A4A;
}
.input-group-gold input:focus { border-color: #D4917D; background: rgba(255, 255, 255, 0.95); box-shadow: 0 0 0 3px rgba(212, 145, 125, 0.15); }
.input-group-gold i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #B8927E; font-size: 18px; cursor: pointer; }

.login-actions { display: flex; gap: 12px; }
.login-actions button { flex: 1; padding: 12px; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: transform 0.1s; }
.login-actions button:active { transform: scale(0.96); }
.btn-cancel { background: rgba(212, 145, 125, 0.1); color: #D4917D; }
.btn-signin { background: linear-gradient(135deg, #D4917D 0%, #B8927E 100%); color: white; box-shadow: 0 8px 20px rgba(212, 145, 125, 0.3); }

/* Logout Specific */
.btn-logout-confirm {
    background: linear-gradient(135deg, #F0A9A8 0%, #E8918F 100%); color: white; border: none;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3); transition: all 0.2s ease;
}
.btn-logout-confirm:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4); }
.btn-logout-confirm:active { transform: scale(0.96); }


/* ========================================
   ADMIN DASHBOARD CONTENT (Updated)
======================================== */

.admin-dashboard-wrapper {
    /* 🚀 STRETCH UPDATE: Reduced width by ~20% */
    width: 80%;           
    max-width: 1000px;
    
    /* 🚀 FIX: Full Height to Allow Inner Scroll */
    height: 100%;
    
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- ROW 1: INPUTS (Claymorphism) --- */
.admin-input-row {
    display: flex; gap: 10px; align-items: center;
    background: rgba(255, 250, 247, 0.9);
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(180, 120, 80, 0.08);
    border: 1px solid rgba(212, 145, 125, 0.1);
    flex-shrink: 0;
}

.admin-input {
    border: 1px solid rgba(212, 145, 125, 0.15);
    background: rgba(255, 250, 247, 0.9);
    border-radius: 12px; padding: 10px 12px;
    font-size: 14px; color: #4A4A4A; outline: none;
    transition: all 0.2s; height: 42px;
}
.admin-input:focus { border-color: #D4917D; background: rgba(255, 255, 255, 0.95); box-shadow: 0 0 0 2px rgba(212, 145, 125, 0.15); }

/* Date Input Styling (Claymorphism) */
.date-input { 
    width: 130px; 
    font-family: sans-serif; 
    cursor: pointer;
    position: relative;
    color-scheme: light;
}

.date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23D4917D' viewBox='0 0 16 16'%3e%3cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3e%3c/svg%3e");
    background-position: center;
    background-size: 16px;
    background-repeat: no-repeat;
    opacity: 1; /* Keep it visible */
    
    /* Make the click target huge */
    padding: 10px;
    margin-right: -10px;
}
#admin-tank-no { width: 115px; text-align: center; } 
.flex-grow { flex: 1; }

/* --- ROW 2: SEARCH & ACTIONS (Claymorphism) --- */
.admin-action-row { 
    display: flex; gap: 10px; align-items: center; 
    flex-shrink: 0;
}
.admin-search-box {
    flex: 1; position: relative; 
    background: rgba(255, 250, 247, 0.9);
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(180, 120, 80, 0.08);
    border: 1px solid rgba(212, 145, 125, 0.15);
}
.admin-search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #D4917D; }
.admin-search-box input {
    width: 100%; padding: 12px 12px 12px 40px;
    border: none; border-radius: 12px;
    background: transparent;
    outline: none; font-size: 14px; color: #4A4A4A;
}
.admin-search-box input:focus { background: rgba(255, 255, 255, 0.9); }

.btn-gold-primary {
    background: linear-gradient(135deg, #D4917D 0%, #B8927E 100%); color: white; border: none;
    padding: 0 36px; 
    height: 42px; border-radius: 12px;
    font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap;
    box-shadow: 0 4px 10px rgba(212, 145, 125, 0.25); transition: transform 0.1s;
}

.btn-gold-outline {
    background: rgba(255, 250, 247, 0.9); color: #D4917D; border: 1px solid rgba(212, 145, 125, 0.3);
    padding: 0 20px; height: 42px; border-radius: 12px;
    font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; transition: all 0.2s;
}
.btn-gold-outline:active { background: rgba(255, 255, 255, 0.95); transform: scale(0.96); }
.btn-gold-primary:active { transform: scale(0.96); }

/* --- LIST CONTAINER (The Scrollable Area) --- */
.admin-list-container {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    
    /* 🚀 MAXIMUM SMOOTHNESS SETTINGS */
    -webkit-overflow-scrolling: touch; /* Native iOS Momentum */
    scroll-behavior: smooth;
    
    /* Hardware Acceleration Hints */
    will-change: scroll-position;
    transform: translateZ(0);
    
    /* Padding for comfortable scrolling */
    padding-bottom: 50px;
    padding-top: 4px;
    
    /* Performance Isolation */
    contain: size layout style;
}

.empty-state-gold { text-align: center; padding: 40px; color: #ccc; border: 2px dashed #eee; border-radius: 16px; margin-top: 20px; }

/* ========================================
   DROPDOWN SPECIFICS (Claymorphism)
======================================== */
select.admin-input {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27292.4%27%20height%3D%27292.4%27%3E%3Cpath%20fill%3D%27%23D4917D%27%20d%3D%27M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%27%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat; background-position: right 12px top 50%; background-size: 10px auto;
    padding-right: 30px; cursor: pointer;
}
select.admin-input:disabled { background-color: rgba(255, 250, 247, 0.6); color: #a0a0a0; border-color: rgba(212, 145, 125, 0.1); cursor: not-allowed; }

/* ========================================
   ADMIN DATA ROWS (GPU Accelerated)
======================================== */

.admin-task-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    background: rgba(255, 250, 247, 0.95);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(212, 145, 125, 0.15);
    
    box-shadow: 0 1px 3px rgba(180, 120, 80, 0.04);
    
    transform: translate3d(0, 0, 0); 
    backface-visibility: hidden;
    perspective: 1000px;
    
    contain: layout paint;
}

/* 🚀 DISABLE HOVER ON SCROLL (Mobile Fix) */
@media (hover: hover) {
    .admin-task-row:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(212, 145, 125, 0.12);
        border-color: rgba(212, 145, 125, 0.3);
    }
}

/* 1. Checkbox */
.row-check { display: flex; align-items: center; padding-right: 4px; }
.gold-checkbox { width: 22px; height: 22px; accent-color: #D4917D; cursor: pointer; }

/* --- COMMON SECTION STYLES --- */
.row-section { display: flex; flex-direction: column; gap: 6px; }

.section-label { font-size: 10px; color: #B8927E; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

/* --- THE MODERN VALUE BOX --- */
.modern-value-box {
    background: rgba(255, 250, 247, 0.8); border: 1px solid rgba(212, 145, 125, 0.2); border-radius: 8px;
    padding: 8px 12px; font-size: 13px; color: #4A4A4A;
    height: 100%; display: flex; align-items: center;
}

/* Column Specifics */
.row-id { width: 90px; flex-shrink: 0; }
.highlight-box { background: rgba(240, 169, 168, 0.1); border-color: rgba(212, 145, 125, 0.2); color: #D4917D; font-weight: 800; justify-content: center; }

.row-list { flex: 1; min-width: 200px; }
.text-box { line-height: 1.4; font-weight: 500; }

.row-due { width: 110px; flex-shrink: 0; }
.time-box { flex-direction: column; justify-content: center; gap: 2px; text-align: center; }
.due-date { font-weight: 700; color: #4A4A4A; }
.due-time { font-size: 11px; color: #B8927E; }

.row-dynamic { width: 150px; flex-shrink: 0; }
.input-box-wrapper { padding: 4px; background: rgba(255, 250, 247, 0.8); }

.row-obs { width: 150px; flex-shrink: 0; }

.row-input-field {
    width: 100%; padding: 6px 8px; font-size: 13px;
    border: 1px solid transparent; background: transparent; border-radius: 6px; outline: none; color: #4A4A4A;
}
.row-input-field:focus { background: rgba(255, 255, 255, 0.95); border-color: #D4917D; box-shadow: 0 0 0 2px rgba(212, 145, 125, 0.1); }

select.row-input-field {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27292.4%27%20height%3D%27292.4%27%3E%3Cpath%20fill%3D%27%23c5a470%27%20d%3D%27M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%27%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat; background-position: right 8px center; background-size: 10px;
}

/* Row Done Button (Claymorphism) */
.btn-admin-row-done {
    width: 36px; height: 36px; border-radius: 12px; border: none;
    background: rgba(200, 217, 184, 0.2); color: #6ba876; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.btn-admin-row-done:hover { background: #6ba876; color: white; transform: scale(1.1); }

/* 🚀 Make Searchable Inputs look exactly like Clay Dropdowns */
input[list].admin-input {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27292.4%27%20height%3D%27292.4%27%3E%3Cpath%20fill%3D%27%23D4917D%27%20d%3D%27M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%27%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px auto;
    padding-right: 30px;
    cursor: pointer;
}

/* Hide the browser's default black arrow so we see our clay one */
input[list]::-webkit-calendar-picker-indicator {
    opacity: 0 !important;
    position: absolute;
    right: 0;
    top: 0;
    width: 40px; 
    height: 100%;
    cursor: pointer;
}