/* 
 * Anusha Reddy - Design System 2026 
 * Strict Clean Slate
 */

:root {
    /* --- PALETTE --- */
    /* Neutral / Canvas */
    --bg-body: #F4F5F7;
    /* High quality light grey */
    --bg-card: #FFFFFF;
    --bg-sidebar: #FFFFFF;

    /* Text */
    --text-primary: #172B4D;
    /* Deep Blue-Grey */
    --text-secondary: #5E6C84;
    --text-placeholder: #A5ADBA;

    /* Brand / Actions */
    --primary: #000000;
    /* Luxury Black */
    --primary-hover: #333333;
    --accent-blue: #0052CC;
    /* Standard Link/Action Blue */

    /* Semantic Colors (Badges) */
    --success-bg: #E3FCEF;
    --success-text: #006644;
    --warning-bg: #FFF0B3;
    --warning-text: #172B4D;
    --danger-bg: #FFEBE6;
    --danger-text: #DE350B;
    --info-bg: #DEEBFF;
    --info-text: #0747A6;
    --neutral-bg: #EBECF0;
    --neutral-text: #42526E;

    /* --- DIMENSIONS --- */
    --nav-width: 260px;
    --header-height: 70px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 999px;

    /* --- SPACING --- */
    --sp-xs: 4px;
    --sp-sm: 8px;
    --sp-md: 16px;
    --sp-lg: 24px;
    --sp-xl: 32px;

    /* --- SHADOWS --- */
    --shadow-sm: 0 1px 2px rgba(9, 30, 66, 0.25);
    --shadow-card: 0 4px 12px rgba(9, 30, 66, 0.05);
    --shadow-float: 0 8px 24px rgba(9, 30, 66, 0.1);
}

/* --- RESET & TYPO --- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-body);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

h1 {
    font-size: 24px;
}

h2 {
    font-size: 20px;
}

h3 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

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

button,
input,
select,
textarea {
    font-family: inherit;
}

/* --- APP LAYOUT --- */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--nav-width);
    background: var(--bg-sidebar);
    border-right: 1px solid #DFE1E6;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 var(--sp-lg);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-menu {
    flex: 1;
    padding: var(--sp-md);
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: 10px var(--sp-md);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-item:hover {
    background: var(--neutral-bg);
    color: var(--text-primary);
}

.nav-item.active {
    background: #E6EFFC;
    color: var(--accent-blue);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Prevent overflow blowout */
    background: var(--bg-body);
}

.top-header {
    height: var(--header-height);
    background: var(--bg-body);
    /* Transparent/same as body */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--sp-xl);
    position: sticky;
    top: 0;
    z-index: 90;
}

.page-wrapper {
    flex: 1;
    padding: 0 var(--sp-xl) var(--sp-xl) var(--sp-xl);
    overflow-y: auto;
}

/* --- COMPONENTS --- */

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--sp-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: var(--sp-lg);
}

/* Form Elements */
.form-group {
    margin-bottom: var(--sp-md);
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #DFE1E6;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    background: #FAFBFC;
    transition: all 0.2s;
}

.form-control:focus {
    background: #FFF;
    border-color: var(--accent-blue);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 14px;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: #FFF;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #FFF;
    color: var(--text-primary);
    border: 1px solid #DFE1E6;
}

.btn-secondary:hover {
    background: var(--neutral-bg);
}

.btn-icon-only {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

/* Pills / Badges */
.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.badge-neutral {
    background: var(--neutral-bg);
    color: var(--neutral-text);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info-text);
}

/* List / Table Rows */
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-md);
    background: #FFF;
    border-bottom: 1px solid #EBECF0;
    transition: background 0.1s;
    cursor: pointer;
}

.list-item:first-child {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.list-item:last-child {
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    border-bottom: none;
}

.list-item:hover {
    background: #FAFBFC;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-md);
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--sp-md);
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-gap {
    display: flex;
    gap: var(--sp-md);
    align-items: center;
}

/* --- Search Bar --- */
.search-container {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    background: #FFF;
    box-shadow: var(--shadow-sm);
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    box-shadow: var(--shadow-card);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-placeholder);
}

/* --- Avatars --- */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin-right: 12px;
}

.bg-blue {
    background: #E6EFFC;
    color: #0052CC;
}

.bg-purple {
    background: #EAE6FF;
    color: #5243AA;
}

.bg-green {
    background: #E3FCEF;
    color: #006644;
}

.bg-orange {
    background: #FFF0B3;
    color: #172B4D;
}

/* --- UTILITIES --- */
.mb-sm {
    margin-bottom: var(--sp-sm);
}

.mb-md {
    margin-bottom: var(--sp-md);
}

.mb-lg {
    margin-bottom: var(--sp-lg);
}

.text-muted {
    color: var(--text-secondary);
}

.text-right {
    text-align: right;
}

.w-full {
    width: 100%;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: absolute;
        height: 100%;
        box-shadow: var(--shadow-float);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .top-header {
        padding: 0 var(--sp-md);
    }

    .page-wrapper {
        padding: 0 var(--sp-md) var(--sp-md) var(--sp-md);
    }

    .mobile-hidden {
        display: none !important;
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 30, 66, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: #FFF;
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    padding: var(--sp-lg);
    box-shadow: var(--shadow-float);
    animation: slideUp 0.2s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}