*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Segoe UI, sans-serif;
}

body{
    background:#f5f7fa;
    min-height:100vh;
    color:#2d3436;
}

body.dark{
    background:#0f172a;
    color:#e5e7eb;
}

/* =====================
   LAYOUT
===================== */

.container{
    max-width:1000px;
    margin:auto;
    padding:20px;
}

.card{
    background:white;
    padding:30px;
    border-radius:20px;
    box-shadow:0 5px 20px rgba(0,0,0,.1);
}

body.dark .card{
    background:#111827;
    box-shadow:0 5px 25px rgba(0,0,0,.5);
}

/* =====================
   HEADER
===================== */

.header h1{
    font-size:42px;
    color:#2d3436;
}

.header p{
    color:#636e72;
}

body.dark .header h1,
body.dark .header p{
    color:#e5e7eb;
}

/* =====================
   USERS GRID
===================== */

.grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:20px;
}

.user{
    background:white;
    border-radius:20px;
    padding:30px;
    text-align:center;
    font-size:22px;
    font-weight:bold;
    text-decoration:none;
    color:#2d3436;
    box-shadow:0 4px 15px rgba(0,0,0,0.1);
    transition:0.2s;
}

body.dark .user{
    background:#111827;
    color:#e5e7eb;
}

.user:hover{
    transform:translateY(-4px);
}

/* =====================
   INPUTS
===================== */

input[type=password],
input[type=number],
input[type=text]{
    width:100%;
    padding:15px;
    border:1px solid #ddd;
    border-radius:10px;
    font-size:20px;
    background:white;
    color:#2d3436;
}

body.dark input{
    background:#1f2937;
    border:1px solid #374151;
    color:#e5e7eb;
}

/* focus */
input:focus{
    outline:none;
    border-color:#27ae60;
    box-shadow:0 0 0 3px rgba(39,174,96,0.15);
}

body.dark input:focus{
    box-shadow:0 0 0 3px rgba(39,174,96,0.25);
}

/* =====================
   BUTTONS
===================== */

button.primary{
    background:#27ae60;
    color:white;
    border:none;
    padding:15px 25px;
    border-radius:10px;
    cursor:pointer;
    font-size:18px;
    transition:0.15s;
}

button.primary:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(0,0,0,0.15);
}

button.primary:active{
    transform:scale(0.94);
}

/* =====================
   MENU
===================== */

.menu a{
    text-decoration:none;
    padding:10px 20px;
    background:white;
    border-radius:10px;
    color:#2d3436;
}

body.dark .menu a{
    background:#111827;
    color:#e5e7eb;
}

/* =====================
   TABLE
===================== */

.money-table th{
    background:#27ae60;
    color:white;
    padding:15px;
}

.money-table td{
    padding:12px;
    border-bottom:1px solid #eee;
}

body.dark .money-table td{
    border-bottom:1px solid #1f2937;
}

/* =====================
   TOTAL
===================== */

.total{
    margin-top:20px;
    font-size:32px;
    font-weight:bold;
    color:#27ae60;
    transition:0.2s;
}

.total:hover{
    transform:scale(1.02);
}

/* =====================
   KEYBOARD / KEYPAD
===================== */

.keypad{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:15px;
    margin-top:20px;
}

.keypad .key{
    background:white;
    border:none;
    padding:25px;
    font-size:24px;
    border-radius:15px;
    box-shadow:0 4px 10px rgba(0,0,0,0.1);
    transition:0.15s;
}

body.dark .keypad .key{
    background:#1f2937;
    color:#e5e7eb;
    box-shadow:0 4px 10px rgba(0,0,0,0.5);
}

.keypad .key:hover{
    transform:translateY(-2px);
}

.keypad .key:active{
    transform:scale(0.94);
}

.keypad .delete{
    background:#e74c3c;
    color:white;
}

.keypad .submit{
    background:#27ae60;
    color:white;
    grid-column:span 3;
}

/* =====================
   COIN ROWS
===================== */

.coin-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:16px;
    margin-bottom:12px;
    background:white;
    border-radius:18px;
    box-shadow:0 3px 12px rgba(0,0,0,0.06);
    gap:10px;
    animation:fadeUp 0.35s ease both;
}

body.dark .coin-row{
    background:#111827;
}

.coin-value{
    font-size:20px;
    font-weight:600;
    width:90px;
}

.coin-row .btn{
    width:52px;
    height:52px;
    font-size:26px;
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#27ae60;
    color:white;
    transition:0.15s;
}

.coin-row .btn:active{
    transform:scale(0.94);
}

.coin-row input{
    width:60px;
    height:48px;
    font-size:20px;
    text-align:center;
    border-radius:12px;
    border:1px solid #ddd;
    background:white;
}

body.dark .coin-row input{
    background:#1f2937;
    border:1px solid #374151;
    color:#e5e7eb;
}

.subtotal{
    font-size:18px;
    font-weight:700;
    min-width:90px;
    text-align:right;
    color:#2d3436;
}

body.dark .subtotal{
    color:#e5e7eb;
}

/* =====================
   ANIMATIONS
===================== */

@keyframes fadeUp{
    from{
        opacity:0;
        transform:translateY(10px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

/* =====================
   LOGIN SPECIFIC
===================== */

.login-card{
    max-width:400px;
    margin:50px auto;
    padding:30px;
    text-align:center;
}

/* =====================
   LOGOUT
===================== */

.logout-btn{
    background:#e74c3c;
    color:white;
    padding:10px 15px;
    border-radius:10px;
    text-decoration:none;
    font-size:16px;
    transition:0.2s;
}

.logout-btn:hover{
    transform:translateY(-2px);
    box-shadow:0 6px 15px rgba(0,0,0,0.2);
}

/* =====================
   GLOBAL TOUCH
===================== */

html, body{
    touch-action: manipulation;
}

*{
    -webkit-tap-highlight-color: transparent;
}