/* ===========================
   AutoDoc Generator - Global Styles
   Primary Color: Navy (#0B1F3A)
   Design: Clean, Modern, Minimal
   =========================== */

:root {
    /* Color System */
    --primary-blue: #3B82F6;
    --primary-dark: #0B1F3A;
    --navy-primary: #11315b;
    --navy-hover: #0c2243;
    --navy-light: #214069;
    --accent-bg: #EAF0FF;

    /* Status Colors */
    --success: #1F8A4C;
    --success-light: #D4F4DD;
    --warning: #B7791F;
    --warning-light: #FFF4E5;
    --error: #C53030;
    --error-light: #FFE5E5;
    --info: #2E5AAC;
    --info-light: #E3EDFF;

    /* Neutral Colors */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-350: #B7BCC5;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;

    /* Spacing (8pt grid) */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 40px;
    --space-6: 48px;
    --space-8: 64px;
    --space-9: 80px;
    --space-10: 100px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Shadows - Centered for lifted effect */
    --shadow-sm: 0 0 8px 0 rgba(0, 0, 0, 0.08);
    --shadow-md: 0 0 12px 2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 0 20px 4px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 0 30px 6px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   Reset & Base Styles
   =========================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-900);
    background-color: var(--gray-100);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===========================
   Typography
   =========================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 { font-size: 2.5rem; margin-bottom: var(--space-3); }
h2 { font-size: 2rem; margin-bottom: var(--space-2); }
h3 { font-size: 1.5rem; margin-bottom: var(--space-2); }
h4 { font-size: 1.25rem; margin-bottom: var(--space-2); }
h5 { font-size: 1.125rem; margin-bottom: var(--space-1); }
h6 { font-size: 1rem; margin-bottom: var(--space-1); }

p {
    margin-bottom: var(--space-2);
    color: var(--gray-700);
}

a {
    color: var(--navy-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--navy-hover);
}

/* ===========================
   Buttons
   =========================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Primary Button (Navy) */
.btn-primary {
    background-color: var(--navy-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--navy-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

/* Secondary Button (Outline) */
.btn-secondary {
    background-color: white;
    color: var(--navy-primary);
    border: 2px solid var(--navy-primary);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--accent-bg);
}

/* Tertiary Button (Text only) */
.btn-tertiary {
    background-color: transparent;
    color: var(--navy-primary);
    padding: 8px 16px;
}

.btn-tertiary:hover:not(:disabled) {
    background-color: var(--gray-100);
}

/* Success Button */
.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #1a7540;
}

/* Danger Button */
.btn-danger {
    background-color: var(--error);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #a02626;
}

/* Button Sizes */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

/* ===========================
   Form Elements
   =========================== */

.form-group {
    margin-bottom: var(--space-3);
}

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

.form-label.required::after {
    content: " *";
    color: var(--error);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--gray-900);
    background-color: white;
    border: 2px solid var(--gray-400);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    font-family: var(--font-sans);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder,
.form-select::placeholder {
    color: var(--gray-300);
    opacity: 1;
}

/* Firefox */
.form-input::-moz-placeholder,
.form-textarea::-moz-placeholder,
.form-select::-moz-placeholder {
    color: var(--gray-300);
    opacity: 1;
}

/* Edge */
.form-input::-ms-input-placeholder,
.form-textarea::-ms-input-placeholder,
.form-select::-ms-input-placeholder {
    color: var(--gray-300);
    opacity: 1;
}

/* All textareas and inputs globally */
input::placeholder,
textarea::placeholder,
select::placeholder {
    color: var(--gray-300);
    opacity: 1;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-helper {
    display: block;
    margin-top: var(--space-1);
    font-size: 0.875rem;
    color: var(--gray-500);
}

.form-error {
    display: block;
    margin-top: var(--space-1);
    font-size: 0.875rem;
    color: var(--error);
}

/* Checkbox & Radio */
.form-checkbox,
.form-radio {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    cursor: pointer;
}

.form-checkbox input[type="checkbox"],
.form-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--navy-primary);
}

/* ===========================
   Cards
   =========================== */

.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    box-shadow: 0 6px 24px 4px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: 0 6px 24px 4px rgba(0, 0, 0, 0.12);
}

.card-header {
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: var(--space-2);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.card-body {
    padding: var(--space-2) 0;
}

.card-footer {
    padding-top: var(--space-2);
    border-top: 1px solid var(--gray-200);
    margin-top: var(--space-2);
}

/* ===========================
   Status Chips/Badges
   =========================== */

.chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chip-success {
    background-color: var(--success-light);
    color: var(--success);
}

.chip-warning {
    background-color: var(--warning-light);
    color: var(--warning);
}

.chip-error {
    background-color: var(--error-light);
    color: var(--error);
}

.chip-info {
    background-color: var(--info-light);
    color: var(--info);
}

.chip-neutral {
    background-color: var(--gray-100);
    color: var(--gray-700);
}

/* ===========================
   Progress Bar
   =========================== */

.progress {
    width: 100%;
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--navy-primary);
    border-radius: 4px;
    transition: width var(--transition-slow);
}

.progress-bar.success {
    background-color: var(--success);
}

.progress-bar.warning {
    background-color: var(--warning);
}

.progress-bar.error {
    background-color: var(--error);
}

/* ===========================
   Stepper
   =========================== */

.stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) 0;
}

.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.stepper-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 50%;
    right: -50%;
    height: 2px;
    background-color: var(--gray-300);
    z-index: 0;
}

.stepper-item.completed:not(:last-child)::after,
.stepper-item.active:not(:last-child)::after {
    background-color: var(--navy-primary);
}

.stepper-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--gray-400);
    z-index: 1;
    transition: all var(--transition-base);
}

.stepper-item.active .stepper-circle {
    border-color: var(--navy-primary);
    background-color: var(--navy-primary);
    color: white;
}

.stepper-item.completed .stepper-circle {
    border-color: var(--navy-primary);
    background-color: var(--navy-primary);
    color: white;
}

.stepper-label {
    margin-top: var(--space-1);
    font-size: 0.875rem;
    color: var(--gray-600);
    text-align: center;
}

.stepper-item.active .stepper-label {
    color: var(--navy-primary);
    font-weight: 600;
}

/* ===========================
   Table
   =========================== */

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table thead {
    background-color: var(--gray-50);
}

.table th {
    padding: var(--space-2);
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
}

.table td {
    padding: var(--space-2);
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-900);
}

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

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

/* ===========================
   Empty States
   =========================== */

.empty-state {
    text-align: center;
    padding: var(--space-8);
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-2);
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-1);
}

.empty-state-description {
    color: var(--gray-500);
    margin-bottom: var(--space-3);
}

/* ===========================
   Loading Skeleton
   =========================== */

.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: var(--space-1);
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: var(--space-2);
}

/* ===========================
   Utilities
   =========================== */

/* Spacing */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }

.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flex */
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }

/* Text */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* Colors */
.text-navy { color: var(--navy-primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-gray { color: var(--gray-600); }

/* Background */
.bg-navy { background-color: var(--navy-primary); }
.bg-white { background-color: white; }
.bg-gray { background-color: var(--gray-50); }

/* Borders */
.border { border: 1px solid var(--gray-200); }
.border-top { border-top: 1px solid var(--gray-200); }
.border-bottom { border-bottom: 1px solid var(--gray-200); }

/* Width */
.w-full { width: 100%; }
.w-auto { width: auto; }

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-3);
}

.container-sm {
    max-width: 800px;
}

.container-lg {
    max-width: 1400px;
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.375rem; }

    .stepper {
        flex-direction: column;
        gap: var(--space-3);
    }

    .stepper-item:not(:last-child)::after {
        display: none;
    }
}

/* ===========================
   Animations
   =========================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn var(--transition-base) ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight var(--transition-base) ease-out;
}
