/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --blue: #4285F4;
    --dark: #212121;
    --orange: #FFAB40;
    --gray: #595959;
    --light-gray: #EEEEEE;
    --white: #FFFFFF;
    --red: #D93025;
    --green: #0D904F;
    --radius: 6px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--dark);
    background: #f5f5f5;
    line-height: 1.6;
}

/* Login page */
.login-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: linear-gradient(135deg, var(--dark) 0%, #383838 100%);
}

.login-container {
    background: var(--white); padding: 48px 40px; border-radius: 12px;
    width: 100%; max-width: 400px; box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    text-align: center;
}

.login-container h1 { font-size: 28px; color: var(--dark); margin-bottom: 4px; }
.login-container .subtitle { color: var(--gray); font-size: 14px; margin-bottom: 32px; }

/* Forms */
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--dark); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #ccc; border-radius: var(--radius);
    font-size: 14px; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(66,133,244,0.15);
}

/* Buttons */
.btn { display: inline-block; padding: 10px 20px; border: none; border-radius: var(--radius);
    font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
    transition: background 0.2s, opacity 0.2s;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { opacity: 0.9; }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { opacity: 0.9; }
.btn-secondary { background: var(--light-gray); color: var(--dark); }
.btn-secondary:hover { background: #ddd; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { display: block; width: 100%; }

/* Alerts */
.alert { padding: 10px 14px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #FCE8E6; color: var(--red); border: 1px solid #F5C6C1; }
.alert-success { background: #E6F4EA; color: var(--green); border: 1px solid #CEEAD6; }

/* Layout */
.navbar {
    background: var(--dark); color: var(--white); padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; height: 56px;
}
.navbar .brand { font-size: 18px; font-weight: 700; }
.navbar .nav-right { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.navbar .nav-right a { color: var(--white); text-decoration: none; }
.navbar .nav-right a:hover { color: var(--orange); }

.layout { display: flex; min-height: calc(100vh - 56px); }
.sidebar {
    width: 200px; background: var(--white); border-right: 1px solid var(--light-gray);
    padding: 16px 0; flex-shrink: 0;
}
.sidebar a {
    display: block; padding: 10px 24px; color: var(--dark); text-decoration: none;
    font-size: 14px; transition: background 0.15s;
}
.sidebar a:hover, .sidebar a.active { background: #E8F0FE; color: var(--blue); font-weight: 600; }

.content { flex: 1; padding: 24px 32px; max-width: 1200px; }
.content h2 { font-size: 22px; margin-bottom: 20px; color: var(--dark); }

/* Partner top nav -- when no sidebar */
.nav-tabs {
    background: var(--white); border-bottom: 1px solid var(--light-gray);
    display: flex; gap: 0; padding: 0 24px;
}
.nav-tabs a {
    padding: 12px 20px; color: var(--gray); text-decoration: none;
    font-size: 14px; border-bottom: 2px solid transparent; transition: all 0.15s;
}
.nav-tabs a:hover, .nav-tabs a.active { color: var(--blue); border-bottom-color: var(--blue); }

/* Tables */
table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius);
    overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.08); font-size: 14px;
}
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--light-gray); }
th { background: #fafafa; font-weight: 600; color: var(--gray); font-size: 13px; text-transform: uppercase; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8f9fa; }

/* Filter bar */
.filter-bar {
    display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
    margin-bottom: 20px; padding: 16px; background: var(--white);
    border-radius: var(--radius); box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.filter-bar .form-group { margin-bottom: 0; }
.filter-bar select, .filter-bar input { padding: 8px 10px; }

/* Dashboard cards */
.stats-row { display: flex; gap: 16px; margin-bottom: 24px; }
.stat-card {
    flex: 1; background: var(--white); padding: 20px; border-radius: var(--radius);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08); text-align: center;
}
.stat-card .stat-value { font-size: 32px; font-weight: 700; color: var(--blue); }
.stat-card .stat-label { font-size: 13px; color: var(--gray); margin-top: 4px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.pagination a, .pagination span {
    padding: 8px 14px; border-radius: var(--radius); font-size: 14px;
    text-decoration: none; border: 1px solid var(--light-gray); color: var(--dark);
}
.pagination a:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }
.pagination .current { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* Profile / change password */
.profile-section { max-width: 500px; }
.profile-section .card {
    background: var(--white); padding: 24px; border-radius: var(--radius);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08); margin-bottom: 24px;
}
.profile-section .card h3 { font-size: 16px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--light-gray); }

/* Report page */
.report-section { max-width: 600px; }
.report-section .card {
    background: var(--white); padding: 24px; border-radius: var(--radius);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Utility */
.text-right { text-align: right; }
.text-muted { color: var(--gray); font-size: 13px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.inline-form { display: inline; }
