/* ==========================================
   DOCUFIRM - DESIGN SYSTEM
   Color scheme extracted from logo
   ========================================== */

:root {
    /* Primary Colors - Professional Blue */
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;

    /* Transitions */
    --transition: 150ms ease-in-out;
}

/* ==========================================
   GLOBAL STYLES
   ========================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    min-height: 100vh;
    color: var(--gray-800);
}

/* ==========================================
   HEADER / NAVBAR
   ========================================== */

.app-header {
    background: var(--primary);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
    transition: opacity var(--transition);
}

.navbar-brand:hover {
    opacity: 0.9;
    color: white;
}

.navbar-logo {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-nav li {
    display: inline-block;
}

.nav-link {
    padding: 0.75rem 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-2px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ==========================================
   MAIN CONTENT AREA
   ========================================== */

.main-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

/* ==========================================
   CARDS
   ========================================== */

.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: none;
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border-bottom: 2px solid var(--primary-blue);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--gray-800);
}

.card-body {
    padding: 1.5rem;
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.875rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

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

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

.btn-success:hover {
    background: #059669;
    color: white;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
    color: var(--gray-800);
}

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

.btn-info:hover {
    background: #2563eb;
    color: white;
}

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

.btn-warning:hover {
    background: #d97706;
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.8125rem;
}

/* ==========================================
   FORMS
   ========================================== */

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.mb-3 {
    margin-bottom: 1.5rem;
}

/* ==========================================
   TABLES
   ========================================== */

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

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

.table thead th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table thead th:first-child {
    border-top-left-radius: var(--radius-md);
}

.table thead th:last-child {
    border-top-right-radius: var(--radius-md);
}

.table tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: background var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody td {
    padding: 1rem 1.25rem;
}

.table-sm tbody td {
    padding: 0.75rem 1rem;
}

/* ==========================================
   BADGES
   ========================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: capitalize;
}

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

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

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

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

/* ==========================================
   ALERTS
   ========================================== */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.alert-success {
    background: #d1fae5;
    border-color: var(--success);
    color: #065f46;
}

/* ==========================================
   TABS
   ========================================== */

.nav-tabs {
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin-bottom: 1.5rem;
}

.nav-item {
    margin: 0;
}

.nav-tabs .nav-link {
    background: transparent;
    border: 2px solid transparent;
    border-bottom: none;
    color: var(--gray-600);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: -2px;
}

.nav-tabs .nav-link:hover {
    background: var(--gray-50);
    color: var(--primary-blue);
}

.nav-tabs .nav-link.active {
    background: white;
    border-color: var(--primary-blue);
    border-bottom-color: white;
    color: var(--primary-blue);
    font-weight: 600;
}

.tab-content {
    padding-top: 1rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active,
.tab-pane.show {
    display: block;
}

/* ==========================================
   UTILITIES
   ========================================== */

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

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

.ms-auto {
    margin-left: auto;
}

.ms-2 {
    margin-left: 0.5rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -1rem;
}

.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding: 0 1rem;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 1rem;
}

.offset-md-2 {
    margin-left: 16.666667%;
}

/* ==========================================
   PAGE HEADER
   ========================================== */

.page-header {
    margin-bottom: 2rem;
}

.page-header h1,
.page-header h2 {
    color: var(--gray-900);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header h1 {
    font-size: 2.25rem;
}

.page-header h2 {
    font-size: 1.875rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .navbar-container {
        padding: 0 1rem;
        height: 70px;
    }

    .navbar-logo {
        height: 40px;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .navbar-nav {
        flex-direction: column;
        gap: 0.25rem;
    }

    .main-container {
        padding: 1.5rem 1rem;
    }

    .col-md-8,
    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .offset-md-2 {
        margin-left: 0;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .page-header h2 {
        font-size: 1.5rem;
    }
}