@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-blue: #0047AB;
    --primary-light: #3371FF;
    --success-green: #28a745;
    --warning-orange: #fd7e14;
    --danger-red: #dc3545;
    --info-blue: #17a2b8;
    --bg-color: #f4f6f9;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #6c757d;
    --border-color: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Mobile App Wrapper */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    background-color: var(--bg-color);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    background-color: var(--primary-blue);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.app-header .icon-btn {
    color: white;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Content Area */
.app-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    padding-bottom: 80px; /* Space for bottom nav */
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background-color: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 100;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-item.active {
    color: var(--primary-blue);
}

.nav-item i {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.nav-item.add-btn {
    background-color: var(--primary-blue);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    justify-content: center;
    transform: translateY(-20px);
    box-shadow: 0 4px 10px rgba(0, 71, 171, 0.4);
}
.nav-item.add-btn i {
    margin: 0;
    font-size: 1.8rem;
}

/* Utilities */
.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 15px;
}

.text-success { color: var(--success-green); }
.text-danger { color: var(--danger-red); }
.text-warning { color: var(--warning-orange); }
.text-primary { color: var(--primary-blue); }

.btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.2s;
}
.btn-primary {
    background-color: var(--primary-blue);
    color: white;
}
.btn-primary:active {
    opacity: 0.8;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}
.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-weight: 500;
}
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: #f9f9f9;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: #fff;
}

/* Dashboard Grid */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}
.stat-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
}
.stat-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}
.stat-icon {
    align-self: flex-end;
    font-size: 1.5rem;
    margin-top: -20px;
    opacity: 0.2;
}

/* Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.action-item {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 15px 5px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s;
}
.action-item:active {
    transform: scale(0.95);
}
.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 71, 171, 0.1);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 8px;
}
.action-text {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: white;
}
.table th, .table td {
    padding: 12px 8px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}
.table th {
    background-color: #f8f9fa;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}
.table tr:last-child td {
    border-bottom: none;
}
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-cash { background-color: rgba(40, 167, 69, 0.1); color: var(--success-green); }
.badge-online { background-color: rgba(23, 162, 184, 0.1); color: var(--info-blue); }
.badge-paid { color: var(--success-green); }
.badge-due { color: var(--danger-red); }
.badge-pending { color: var(--warning-orange); }

.search-bar {
    display: flex;
    align-items: center;
    background: white;
    padding: 8px 12px;
    border-radius: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.search-bar i {
    color: var(--text-muted);
    margin-right: 10px;
}
.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
}
