:root {
    --bg-color: #1b2838;
    --sidebar-bg: #171a21;
    --card-bg: rgba(23, 26, 33, 0.9);
    --text-color: #c7d5e0;
    --accent-color: #66c0f4;
    --accent-hover: #417a9b;
    --success-color: #5c7e10;
    --danger-color: #a94847;
    --font-family: 'Inter', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at top right, #2a475e 0%, transparent 40%),
        radial-gradient(circle at bottom left, #171a21 0%, transparent 40%);
    color: var(--text-color);
    font-family: var(--font-family);
    min-height: 100vh;
}

/* Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.main-content {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
}

/* Sidebar Elements */
.profile-section {
    text-align: center;
    margin-bottom: 30px;
}

.profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    margin-bottom: 10px;
}

.profile-section h3 {
    margin: 5px 0;
    color: #fff;
    font-size: 1.1em;
}

.user-id {
    font-size: 0.8em;
    opacity: 0.6;
}

.add-debt-btn {
    width: 100%;
    padding: 10px;
    background-color: var(--accent-color);
    border: none;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-debt-btn:hover {
    background-color: var(--accent-hover);
}

.friends-list h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

.friends-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.friends-list li {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.friends-list li:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.friends-list img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    margin-right: 10px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.column h2 {
    font-size: 1.2em;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.empty-state {
    opacity: 0.5;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Debt Cards */
.debt-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
}

.debt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.debt-info {
    display: flex;
    flex-direction: column;
}

.debt-info .item {
    font-weight: 700;
    color: #fff;
    font-size: 1.1em;
}

.debt-info .date {
    font-size: 0.8em;
    opacity: 0.6;
}

.debt-info .role {
    font-size: 0.9em;
    margin-top: 4px;
}

.debt-card.pending {
    border-left: 4px solid #f0ad4e;
}

.debt-card.active {
    border-left: 4px solid var(--accent-color);
}

.debt-card.settling {
    border-left: 4px solid #5bc0de;
}

.debt-card.settled {
    border-left: 4px solid var(--success-color);
    opacity: 0.7;
}

/* Buttons */
.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    color: #fff;
    font-size: 0.85em;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

.btn-sign {
    background-color: var(--success-color);
}

.btn-settle {
    background-color: var(--accent-color);
}

.btn-confirm {
    background-color: var(--success-color);
}

.btn-primary {
    background-color: var(--accent-color);
    width: 100%;
    padding: 10px;
    margin-top: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #21252d;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    color: #c7d5e0;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 10px;
    background: #171a21;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}

/* Login Page overrides */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    width: 100%;
    max-width: 400px;
}