/* =========================================
   1. VARIABLES & SETUP (From the Design you liked)
   ========================================= */
:root {
    /* Colors from the Accounting App */
    --bg-body: #f3f9ff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --blur: 20px;
    --primary: #005fb8; /* The specific blue */
    --text-main: #202020;
    --text-muted: #5d5d5d;
    --radius: 16px; /* Rounder corners */
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    
    /* Dimensions */
    --sidebar-width: 260px;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: bold;
}

* { box-sizing: border-box; outline: none; }

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    
    /* The Global Gradient Background */
    background-image: 
        radial-gradient(circle at 5% 5%, rgba(0, 183, 195, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 95% 95%, rgba(0, 95, 184, 0.08) 0%, transparent 50%);
    background-attachment: fixed;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* =========================================
   2. LAYOUT & GLASS SIDEBAR
   ========================================= */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar with Glassmorphism */
.sidebar {
    width: var(--sidebar-width);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur));
    border-left: 1px solid rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    padding: 20px 15px;
    z-index: 10;
}

.logo-box {
    padding: 10px;
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 12px; /* Smooth rounded links */
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.25s ease;
}

.sidebar ul li a i {
    font-size: 1.2rem;
    color: var(--primary);
    opacity: 0.8;
}

/* Hover & Active States */
.sidebar ul li a:hover, .sidebar ul li.active a {
    background-color: rgba(0, 95, 184, 0.08); /* Light Blue Tint */
    color: var(--primary);
}

.content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* =========================================
   3. MODERN CARDS & INPUTS
   ========================================= */
/* The Main Card Container */
.win11-card, .digital-card {
    background: white;
    border-radius: var(--radius); /* 16px */
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.02);
    margin-bottom: 24px;
    transition: transform 0.3s ease;
}

.win11-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

/* Row & Column Layouts */
.row-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-end;
}

.col {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.col label {
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.col > div { display: flex; gap: 8px; width: 100%; }

/* Inputs matching the Search Bar design */
.win11-input {
    width: 100%;
    height: 45px;
    padding: 0 15px;
    border: 1px solid #eaeaea;
    border-radius: 12px; /* Softer inputs */
    background: #fdfdfd;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.win11-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 4px 10px rgba(0, 95, 184, 0.1);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    height: 45px;
    padding: 0 25px;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 95, 184, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 95, 184, 0.3);
}

.btn-sec {
    background: white;
    color: var(--text-muted);
    border: 1px solid #eaeaea;
    height: 45px;
    padding: 0 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-sec:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* =========================================
   4. THE TABLE (Seamless Modern Look)
   ========================================= */
.table-responsive {
    width: 100%;
    margin-top: 20px;
    background: white;
    border-radius: 12px; /* Smooth corners */
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden; /* Clips the corners */
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.slip-table, .modern-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    table-layout: fixed; /* Keeps columns steady */
}

/* --- HEADER --- */
.slip-table th {
    background: #f8faff; /* Very light blue tint */
    padding: 18px 10px;
    color: var(--primary);
    font-family: 'Vazirmatn';
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 2px solid #eef2f6;
    border-left: 1px solid #f0f0f0; /* Subtle separator */
    text-align: center;
}

/* --- ROWS --- */
.slip-table td {
    padding: 0; /* Remove padding so input fills the cell */
    border-bottom: 1px solid #f5f5f5;
    border-left: 1px solid #fcfcfc;
    height: 50px; /* Comfortable height */
    position: relative;
    background: white;
    transition: background 0.2s;
}

/* Zebra Striping (Very subtle) */
.slip-table tbody tr:nth-child(even) td {
    background: #fcfcfc;
}

/* Hover Effect */
.slip-table tbody tr:hover td {
    background: #f0f7ff; /* Highlights row on hover */
}

/* --- INPUTS (The Main Fix) --- */
/* We force the inputs to be transparent and borderless */
.slip-table input {
    width: 100%;
    height: 100%;
    border: none !important;      /* REMOVES THE BOX BORDER */
    background: transparent !important; /* REMOVES THE GRAY BG */
    outline: none !important;
    text-align: center;
    font-family: 'Vazirmatn';
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 500;
}

/* When you click an input */
.slip-table input:focus {
    background: rgba(0, 95, 184, 0.05) !important;
    box-shadow: inset 0 -2px 0 var(--primary); /* Blue underline effect */
}

/* The "Total" Column (Readonly) */
.slip-table input[readonly] {
    color: var(--primary);
    font-weight: 800;
    background: transparent !important;
    cursor: default;
}

/* --- DELETE BUTTON (X) --- */
/* Targeting the last column which contains the X */
.slip-table td:last-child {
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    font-size: 1.1rem;
    color: #ff4d4f; /* Nice Red */
    transition: all 0.2s;
}

.slip-table td:last-child:hover {
    background: #fff1f0 !important;
    transform: scale(1.1);
}

/* =========================================
   5. LICENSE PLATE (Kept functional but cleaner)
   ========================================= */
.plate-wrapper {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    direction: ltr;
}

.plate-box {
    display: flex;
    border: 2px solid #333;
    border-radius: 6px;
    background: white;
    height: 45px; /* Match input height */
    overflow: hidden;
    width: fit-content;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.plate-blue {
    background-color: #003399;
    width: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #333;
}

.iran-text { color: white; font-size: 10px; font-weight: bold; margin-bottom: 2px; }

.plate-input {
    border: none;
    text-align: center;
    font-family: 'Vazirmatn';
    font-weight: bold;
    font-size: 1.3rem;
    height: 100%;
    background: transparent;
    padding: 0;
    margin: 0;
}

.plate-divider {
    width: 2px;
    background-color: #333;
    height: 100%;
}

.p-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
}

/* =========================================
   6. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .app-container { flex-direction: column; }
    
    .sidebar { 
        width: 100%; 
        height: auto; 
        border-left: none; 
        border-bottom: 1px solid rgba(0,0,0,0.06);
        padding: 10px;
    }
    
    .sidebar .logo-box { display: none; }
    
    .sidebar ul { 
        display: flex; 
        overflow-x: auto; 
        gap: 10px; 
    }
    
    .sidebar ul li a { 
        white-space: nowrap; 
        background: white;
        border: 1px solid #eee;
        padding: 8px 15px;
    }

    .content { padding: 15px; }
    .col { min-width: 100%; margin-bottom: 10px; }
    .plate-wrapper { justify-content: center; margin-top: 10px; }
}

/* =========================================
   7. PRINT
   ========================================= */
@media print {
    .no-print, .sidebar { display: none !important; }
    .content { padding: 0; }
    .win11-card { box-shadow: none; border: none; padding: 0; }
    body { background: white; }
    .plate-blue { -webkit-print-color-adjust: exact; background-color: #003399 !important; }
}

/* Login Center */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90vh;
}
.login-card { width: 100%; max-width: 380px; text-align: center; }