:root {
    --primary-color: #cc1e2c;
    --primary-dark: #a01521;
    --success-color: #2e8b57;
    --bg-color: #f5f6fa;
    --card-bg: #ffffff;
    --text-dark: #2d3436;
    --text-muted: #636e72;
    --border-color: #dfe6e9;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
}

/* Login Page Styles */
.login-bg {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--bg-color);
}

.login-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-block {
    display: block;
    width: 100%;
}

.alert {
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

/* Dashboard Styles */
.mobile-wrapper {
    max-width: 480px;
    margin: 0 auto;
    background-color: white;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.top-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-header .app-title {
    font-weight: 600;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-header .icons {
    display: flex;
    gap: 15px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    margin: -1rem 1rem 1rem 1rem;
    padding: 1.5rem 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    position: relative;
    z-index: 10;
}

.summary-item {
    flex: 1;
    text-align: center;
}

.summary-item:first-child {
    border-right: 1px solid var(--border-color);
}

.summary-amount {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.amount-receive {
    color: var(--primary-color);
}

.amount-pay {
    color: var(--success-color);
}

.summary-label {
    font-size: 14px;
    color: var(--text-muted);
}

.search-section {
    padding: 0 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 10px;
}

.search-box {
    flex: 1;
    background: var(--bg-color);
    border-radius: 20px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
}

.search-box input {
    border: none;
    background: transparent;
    width: 100%;
    margin-left: 8px;
    font-size: 15px;
    outline: none;
}

.party-list-header {
    padding: 0 1rem 0.5rem;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.party-list {
    padding: 0 1rem;
    padding-bottom: 80px; /* Space for FAB */
}

.party-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.party-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    margin-right: 15px;
}

.avatar-customer {
    background-color: #e6f4ea;
    color: #137333;
}

.avatar-supplier {
    background-color: #fef7e0;
    color: #b06000;
}

.party-info {
    flex: 1;
}

.party-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.party-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.party-balance {
    text-align: right;
    font-weight: 600;
    font-size: 15px;
}

.bal-customer {
    color: var(--primary-color);
}

.bal-supplier {
    color: var(--success-color);
}

/* Floating Action Button */
.fab {
    position: absolute;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(204, 30, 44, 0.4);
    cursor: pointer;
    z-index: 100;
    border: none;
    transition: transform 0.2s;
}

.fab:active {
    transform: scale(0.95);
}

/* Bottom Navigation (visual only to match screenshot) */
.bottom-nav {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: white;
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    border-top: 1px solid var(--border-color);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
}

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

.nav-item svg {
    margin-bottom: 4px;
}

/* Modal Styles */
.modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: none;
    justify-content: center;
    align-items: flex-end;
}

.modal-content {
    background: white;
    width: 100%;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 20px;
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.modal-header h3 {
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}
