:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-gradient: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text-color: #1e293b;
    --text-muted: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 15px;
}

@media (max-width: 600px) {
    .app-container {
        margin: 20px auto;
    }
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 26px;
    margin-bottom: 8px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.5px;
}

header p {
    color: var(--text-muted);
    font-size: 15px;
    margin: 0;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.1);
}

@media (max-width: 600px) {
    .glass-panel {
        padding: 20px;
        border-radius: 16px;
    }
}

.form-group {
    margin-bottom: 22px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #334155;
}

input, select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.8);
    color: #334155;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.02);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

input::placeholder {
    color: #94a3b8;
}

button {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active {
    transform: translateY(2px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.7);
    color: #475569;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.actions {
    margin-top: 25px;
    text-align: center;
}

/* Table styles */
.table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.9);
    overflow: hidden;
    white-space: nowrap;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: rgba(240, 240, 240, 0.8);
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge.pending {
    background-color: var(--warning-color);
    color: #000;
}

.badge.paid {
    background-color: var(--success-color);
    color: #fff;
}

.btn-pay {
    background-color: var(--success-color);
    color: white;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-pay:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
}

.btn-print-sm {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    border: none;
    margin-left: 5px;
}

/* Print Only Section */
.print-only {
    display: none;
}

/* PRINTER STYLES (80mm) */
@media print {
    @page {
        margin: 0; /* Remove default browser margins */
        size: 80mm auto; /* 80mm width */
    }

    body {
        margin: 0;
        padding: 0;
        background: none;
        font-family: 'Courier New', Courier, monospace; /* Monospace is good for receipts */
        color: #000;
    }

    .no-print {
        display: none !important;
    }

    .print-only {
        display: block;
        width: 72mm; /* Give some inner margin relative to 80mm */
        margin: 0 auto;
        padding-top: 5mm;
    }

    .receipt {
        font-size: 11px;
        line-height: 1.4;
    }

    .receipt-header {
        text-align: center;
        margin-bottom: 10px;
    }

    .receipt-header h2 {
        font-size: 14px;
        margin: 0 0 5px 0;
        font-weight: bold;
    }

    .receipt-header p {
        margin: 2px 0;
    }

    .divider {
        font-family: monospace;
        text-align: center;
        margin: 5px 0;
        overflow: hidden;
        white-space: nowrap;
    }

    .receipt-body .row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 3px;
    }

    .receipt-body .label {
        font-weight: normal;
    }

    .receipt-body .value {
        text-align: right;
    }

    .receipt-body .bold {
        font-weight: bold;
    }

    .receipt-footer {
        text-align: center;
        margin-top: 15px;
        font-size: 10px;
    }

    .receipt-footer p {
        margin: 3px 0;
    }
}
