/* ========================================
   MULTIPLE TASK ENTRY - TANK LEVEL SUBMIT
   Style: White & Light Blue Theme
   Logic: Zero Space, Fixed Slide, Calc Height
======================================== */

/* --- 1. The Sheet (Main Drawer) --- */
.MTentry-screen {
    position: fixed; 
    top: 0; 
    bottom: 0; 
    left: 0; 
    right: 0;
    
    /* THEME: Warm cream Claymorphism */
    background: linear-gradient(180deg, rgba(255, 248, 243, 0.98) 0%, rgba(255, 250, 247, 0.95) 100%);
    /*box-shadow: 0 -10px 40px rgba(13, 110, 253, 0.15); */
    z-index: 1050;
    
    /* Animation */
    transform: translate3d(0, 100%, 0);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
    
    display: flex; 
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.MTentry-screen.active { transform: translate3d(0, 0, 0); }

/* --- 2. Header --- */
.mt-header {
    height: 60px;
    padding: 0 20px;
    background: rgba(255, 248, 243, 0.98);
    border-bottom: 1px solid rgba(212, 145, 125, 0.15);
    display: flex; justify-content: space-between; align-items: center;
    border-top-left-radius: 20px; border-top-right-radius: 20px;
    flex-shrink: 0;
}
.mt-header h2 { 
    font-size: 16px; margin: 0; font-weight: 800; 
    color: #D4917D; 
    text-transform: uppercase; letter-spacing: 0.5px; 
}
.close-btn { 
    background: transparent; border:none; font-size: 2rem; color: #B8927E; cursor: pointer; line-height: 1;
}
.close-btn:hover { color: #D4917D; }

/* --- 3. Content Scroll Area --- */
.mt-content { 
    flex: 1; overflow-y: auto; 
    padding: 0; padding-top: 0; padding-bottom: 100px;
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0); 
}

/* ========================================
   ACCORDIONS
======================================== */

.mt-slot-section { margin-bottom: 2px; }

/* Sticky Header - TIME SLOT (Claymorphism) */
.mt-slot-header {
    position: sticky; top: -1px; z-index: 100;
    
    background: rgba(255, 248, 243, 0.98); 
    border-bottom: 1px solid rgba(212, 145, 125, 0.15);
    border-left: 6px solid #D4917D; 
    
    padding: 12px 20px;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(212, 145, 125, 0.08); 
}

.slot-title { font-weight: 700; font-size: 15px; color: #4A4A4A; display: flex; align-items: center; gap: 12px; }

.slot-count { 
    background: rgba(212, 145, 125, 0.15); color: #D4917D; 
    padding: 2px 10px; border-radius: 12px; 
    font-size: 12px; font-weight: 700;
}

.slot-icon { transition: transform 0.3s ease; color: #B8927E; }
.mt-slot-header.collapsed .slot-icon { transform: rotate(-90deg); }


/* 🚀 WRAPPER (Animation Engine) */
.mt-slot-wrapper {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.25s ease-out;
    background: rgba(255, 250, 247, 0.95); 
    overflow: hidden; 
}
.mt-slot-wrapper.collapsed { grid-template-rows: 0fr; }

/* CRITICAL FIX: min-height: 0 enables the slide animation */
.mt-slot-inner { 
    min-height: 0; 
    padding: 0;
    display: flex; flex-direction: column; gap: 1px;
}


/* --- Tank Headers (Claymorphism) --- */
.mt-tank-group { background: rgba(255, 250, 247, 0.95); } 

.mt-tank-header {
    display: flex; align-items: center; 
    justify-content: space-between; 
    gap: 10px; cursor: pointer;
    padding: 10px 16px;
    background: rgba(255, 250, 247, 0.95);
    border-bottom: 1px solid rgba(212, 145, 125, 0.1);
    
    color: #4A4A4A; 
    font-weight: 700; font-size: 13px; text-transform: uppercase;
}
.tank-left { display: flex; align-items: center; gap: 10px; } /* Group icon + text */

.tank-icon { font-size: 12px; transition: transform 0.2s; color: #B8927E; }
.mt-tank-header.collapsed .tank-icon { transform: rotate(-90deg); }

/* 🚀 Tank Level Submit Button (Claymorphism) */
.btn-tank-submit {
    background: linear-gradient(135deg, #D4917D 0%, #B8927E 100%); color: #fff; border: none; padding: 4px 12px;
    border-radius: 8px; font-weight: 700; font-size: 10px; cursor: pointer;
    text-transform: uppercase; letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(212, 145, 125, 0.2);
    transition: all 0.2s;
}
.btn-tank-submit:hover { transform: translateY(-1px); }
.btn-tank-submit:active { transform: scale(0.95); }


/* Tank Wrapper */
.mt-tank-wrapper {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.25s ease-out;
    background: rgba(255, 250, 247, 0.95);
    overflow: hidden; 
}
.mt-tank-wrapper.collapsed { grid-template-rows: 0fr; }

/* ZERO SPACE FIX */
.mt-tank-inner { 
    min-height: 0;
    padding: 0;     /* 0 padding */
    display: flex; 
    flex-direction: column; 
    gap: 0;         /* 0 gap */
}


/* ========================================
   CARD GRID (Flush Style)
======================================== */
/* ========================================
   CARD GRID (Flush Style)
======================================== */
.mt-card {
    background: rgba(255, 250, 247, 0.95);
    border-radius: 0; 
    border: none;
    border-bottom: 1px solid rgba(212, 145, 125, 0.1); 
    
    /* 🚀 CHANGE: 1% Gap on Left & Right */
    margin: 0 1%; 
    
    padding: 0;
    contain: content; 
}

/* Ensure the last card still has no bottom line */
.mt-card:last-child { border-bottom: none; }
.mt-card.selected { background: #f0f7ff; }  

/* Status Stripes (Claymorphism) */
.mt-card.status-overdue   { border-left: 4px solid #d97e7e; } 
.mt-card.status-due-soon  { border-left: 4px solid #F4C7A8; } 
.mt-card.status-upcoming  { border-left: 4px solid #C8D9B8; }

/* Grid Layout */
.mt-card-body {
    padding: 10px;
    display: grid;
    /* 5% | 10% | 15% | 20% | 15% | 15% | 1fr */
    grid-template-columns: 5% 10% 15% 20% 15% 15% 1fr;
    gap: 8px;
    align-items: center;
}

/* --- INFO BOXES (Claymorphism) --- */
.mt-info-box {
    display: flex; flex-direction: column; justify-content: center;
    min-height: 52px; height: auto; 
    padding: 4px;
    background: rgba(255, 248, 243, 0.8); 
    border-radius: 8px;
    border: 1px solid rgba(212, 145, 125, 0.1);
}

.mt-box-label {
    font-size: 10px; color: #B8927E; font-weight: 700; text-transform: uppercase;
    margin-bottom: 3px; display: block; line-height: 1;
    white-space: nowrap;
}

.mt-box-value {
    font-size: 13px; font-weight: 600; color: #4A4A4A;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.2;
}

.box-task { 
    white-space: normal; line-height: 1.2; font-size: 11px; color: #4A4A4A;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.box-id { color: #D4917D; font-family: monospace; }
.mt-param-box { border-left: 3px solid #D4917D; background: rgba(242, 199, 168, 0.1); }

/* Inputs (Claymorphism) */
.mt-input-field, .mt-obs-field {
    width: 100%; 
    border: 1px solid rgba(212, 145, 125, 0.2); 
    border-radius: 8px;
    padding: 6px; font-size: 13px; 
    background: rgba(255, 250, 247, 0.9);
    color: #4A4A4A;
    transition: border 0.2s, box-shadow 0.2s;
    appearance: none; -webkit-appearance: none;
}
.mt-input-field:focus, .mt-obs-field:focus { 
    border-color: #D4917D; 
    outline: none; 
    box-shadow: 0 0 0 2px rgba(212, 145, 125, 0.15);
}

/* Responsive */
@media (max-width: 1200px) {
    .mt-card-body { min-width: 950px; }
    .mt-card { overflow-x: auto; }
}