/* ═══════════════════════════════════════════════════════════════
   PropManager AI - Global Styles
   ═══════════════════════════════════════════════════════════════ */

:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --secondary: #0EA5E9;
    --accent: #F59E0B;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --dark: #1E293B;
    --darker: #0F172A;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gradient: linear-gradient(135deg, #4F46E5, #0EA5E9);
    --gradient-warm: linear-gradient(135deg, #F59E0B, #EF4444);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.15);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--gray-50);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
}

/* ─── Utility Classes ──────────────────────────────────────── */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

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

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

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

.btn-lg {
    padding: 16px 36px;
    font-size: 17px;
    border-radius: 12px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Animations ───────────────────────────────────────────── */

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

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

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

.animate-fade-in-up { animation: fadeInUp 0.6s ease-out forwards; }
.animate-fade-in-down { animation: fadeInDown 0.6s ease-out forwards; }
.animate-fade-in-left { animation: fadeInLeft 0.6s ease-out forwards; }
.animate-fade-in-right { animation: fadeInRight 0.6s ease-out forwards; }
.animate-scale-in { animation: scaleIn 0.5s ease-out forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ─── Form Styles ──────────────────────────────────────────── */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
    color: var(--dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ─── Card Styles ──────────────────────────────────────────── */

.card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
}

/* ─── Badge / Tag ──────────────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: #D1FAE5; color: #065F46; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-info { background: #DBEAFE; color: #1E40AF; }
.badge-primary { background: #EEF2FF; color: #4338CA; }

/* ─── Table ────────────────────────────────────────────────── */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

table th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td {
    padding: 14px 20px;
    font-size: 14px;
    border-top: 1px solid var(--gray-100);
}

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

/* ─── Modal ────────────────────────────────────────────────── */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* ─── Toast / Alert ────────────────────────────────────────── */

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    animation: slideInRight 0.3s ease;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--secondary); }

/* ─── Loading ──────────────────────────────────────────────── */

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ─── Responsive ───────────────────────────────────────────── */

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 15px;
    }
}
