:root {
    --header-height: 60px;
    --sidebar-width: 250px;
    --footer-height: 50px;
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --text-color: #333;
    --bg-color: #f4f6f9;
    --white: #ffffff;
    --border-color: #ddd;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Layout Grid */
.app-container {
    display: grid;
    grid-template-areas: 
        "sidebar header"
        "sidebar main"
        "sidebar footer";
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: var(--header-height) 1fr var(--footer-height);
    min-height: 100vh;
}

/* Header */
.app-header {
    grid-area: header;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 20px;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-title {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Sidebar */
.app-sidebar {
    grid-area: sidebar;
    background-color: var(--primary-color);
    color: var(--white);
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    background-color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    list-style: none;
}

.nav-item a {
    display: block;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item a:hover, .nav-item a.active {
    background-color: var(--secondary-color);
    color: var(--white);
    border-left-color: var(--accent-color);
}

/* Main Content */
.app-main {
    grid-area: main;
    padding: 20px;
    overflow-y: auto;
}

.card {
    background: var(--white);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Footer */
.app-footer {
    grid-area: footer;
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

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

.btn-primary:hover {
    background-color: #2980b9;
}
