/* Salimex CRM - Brand Styling */
/* Based on salimex.cz design system */

:root {
    /* Brand Colors */
    --salimex-primary: #293275;
    --salimex-secondary: #2672AB;
    --salimex-accent: #4DD0E1;
    --salimex-accent-alt: #21AFEF;
    --salimex-light-bg: #CEF1FF;
    --salimex-light-bg-alt: #AEE7FF;

    /* Typography */
    --font-primary: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-heading: 'Roboto Slab', serif;
    --font-condensed: 'Roboto Condensed', sans-serif;

    /* Spacing & Borders */
    --radius-sm: 0.8rem;
    --radius-md: 1.6rem;
    --radius-lg: 2.4rem;
    --radius-xl: 4rem;
}

/* Typography */
body {
    font-family: var(--font-primary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Navbar Styling */
.navbar-salimex {
    background: linear-gradient(135deg, var(--salimex-primary) 0%, var(--salimex-secondary) 100%) !important;
    box-shadow: 0 0.4rem 0.8rem rgba(41, 50, 117, 0.15);
    padding: 1rem 0;
}

.navbar-nav .nav-item {
    margin: 0 0.8rem;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.navbar-brand img {
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.nav-link {
    font-family: var(--font-condensed);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--salimex-accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.dropdown-toggle:hover::after {
    width: 80%;
}

/* Ensure dropdown arrow doesn't interfere with animation */
.nav-link.dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--salimex-accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border: none !important;
}

/* Override Bootstrap dropdown arrow positioning */
.navbar-nav .nav-link.dropdown-toggle::before {
    content: '';
    display: none;
}

.dropdown-menu {
    border-radius: var(--radius-md);
    border: none;
    box-shadow: 0 0.8rem 1.6rem rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
}

.dropdown-item {
    font-family: var(--font-primary);
    padding: 0.8rem 1.6rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--salimex-light-bg);
    color: var(--salimex-primary);
    padding-left: 2rem;
}

/* Buttons */
.btn-salimex-primary {
    background: linear-gradient(135deg, var(--salimex-primary) 0%, var(--salimex-secondary) 100%);
    border: none;
    color: white;
    border-radius: var(--radius-lg);
    padding: 1rem 2.4rem;
    font-family: var(--font-condensed);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 0.4rem 0.8rem rgba(41, 50, 117, 0.2);
}

.btn-salimex-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.8rem 1.6rem rgba(41, 50, 117, 0.3);
    background: linear-gradient(135deg, var(--salimex-secondary) 0%, var(--salimex-primary) 100%);
}

.btn-salimex-secondary {
    background: var(--salimex-accent);
    border: none;
    color: white;
    border-radius: var(--radius-lg);
    padding: 1rem 2.4rem;
    font-family: var(--font-condensed);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-salimex-secondary:hover {
    background: var(--salimex-accent-alt);
    transform: translateY(-2px);
}

.btn-salimex-outline {
    background: transparent;
    border: 2px solid var(--salimex-primary);
    color: var(--salimex-primary);
    border-radius: var(--radius-lg);
    padding: 1rem 2.4rem;
    font-family: var(--font-condensed);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-salimex-outline:hover {
    background: var(--salimex-primary);
    color: white;
    transform: translateY(-2px);
}

/* Cards */
.card-salimex {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-salimex:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.8rem 2.4rem rgba(0, 0, 0, 0.12);
}

.card-salimex-header {
    background: linear-gradient(135deg, var(--salimex-primary) 0%, var(--salimex-secondary) 100%);
    color: white;
    padding: 1.6rem 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    border: none;
}

.card-salimex-light {
    background: var(--salimex-light-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

/* Stats Cards */
.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid var(--salimex-accent);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.8rem 2.4rem rgba(0, 0, 0, 0.12);
}

.stat-card.primary {
    border-left-color: var(--salimex-primary);
}

.stat-card.secondary {
    border-left-color: var(--salimex-secondary);
}

.stat-card.accent {
    border-left-color: var(--salimex-accent);
}

.stat-card .stat-icon {
    width: 4.8rem;
    height: 4.8rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.stat-card.primary .stat-icon {
    background: rgba(41, 50, 117, 0.1);
    color: var(--salimex-primary);
}

.stat-card.secondary .stat-icon {
    background: rgba(38, 114, 171, 0.1);
    color: var(--salimex-secondary);
}

.stat-card.accent .stat-icon {
    background: rgba(77, 208, 225, 0.1);
    color: var(--salimex-accent);
}

.stat-card .stat-value {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--salimex-primary);
    margin-bottom: 0.4rem;
}

.stat-card .stat-label {
    font-family: var(--font-condensed);
    font-size: 0.95rem;
    text-transform: uppercase;
    color: #6c757d;
    letter-spacing: 0.5px;
}

/* Page Headers */
.page-header {
    background: linear-gradient(135deg, var(--salimex-light-bg) 0%, var(--salimex-light-bg-alt) 100%);
    border-radius: var(--radius-lg);
    padding: 2.4rem;
    margin-bottom: 2.4rem;
}

.page-title {
    font-family: var(--font-heading);
    color: var(--salimex-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.page-subtitle {
    font-family: var(--font-primary);
    color: var(--salimex-secondary);
    font-size: 1.1rem;
}

/* Tables */
.table-salimex {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.08);
}

.table-salimex thead {
    background: linear-gradient(135deg, var(--salimex-primary) 0%, var(--salimex-secondary) 100%);
    color: white;
}

.table-salimex thead th {
    font-family: var(--font-condensed);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1.2rem 1.6rem;
    border: none;
}

.table-salimex tbody tr {
    transition: all 0.3s ease;
}

.table-salimex tbody tr:hover {
    background-color: var(--salimex-light-bg);
}

/* Badges */
.badge-salimex {
    font-family: var(--font-condensed);
    font-weight: 600;
    padding: 0.4rem 1.2rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.badge-salimex-primary {
    background-color: var(--salimex-primary);
    color: white;
}

.badge-salimex-secondary {
    background-color: var(--salimex-secondary);
    color: white;
}

.badge-salimex-accent {
    background-color: var(--salimex-accent);
    color: white;
}

/* Forms */
.form-control-salimex {
    border-radius: var(--radius-md);
    border: 2px solid #e0e0e0;
    padding: 0.8rem 1.2rem;
    transition: all 0.3s ease;
}

.form-control-salimex:focus {
    border-color: var(--salimex-accent);
    box-shadow: 0 0 0 0.2rem rgba(77, 208, 225, 0.25);
}

.form-label-salimex {
    font-family: var(--font-condensed);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    color: var(--salimex-primary);
    margin-bottom: 0.6rem;
}

/* Footer */
.footer-salimex {
    background: linear-gradient(135deg, var(--salimex-primary) 0%, var(--salimex-secondary) 100%);
    color: white;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-salimex a {
    color: var(--salimex-accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-salimex a:hover {
    color: white;
}

/* Utilities */
.bg-salimex-primary {
    background-color: var(--salimex-primary) !important;
}

.bg-salimex-secondary {
    background-color: var(--salimex-secondary) !important;
}

.bg-salimex-accent {
    background-color: var(--salimex-accent) !important;
}

.bg-salimex-light {
    background-color: var(--salimex-light-bg) !important;
}

.text-salimex-primary {
    color: var(--salimex-primary) !important;
}

.text-salimex-secondary {
    color: var(--salimex-secondary) !important;
}

.text-salimex-accent {
    color: var(--salimex-accent) !important;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    /* Page Headers */
    .page-header {
        padding: 1.5rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .page-subtitle {
        font-size: 0.9rem;
    }

    /* Navigation */
    .navbar-nav .nav-item {
        margin: 0.2rem 0;
    }

    /* Cards */
    .card-salimex {
        border-radius: var(--radius-md);
    }

    .card-salimex-header {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }

    .card-body {
        padding: 1.5rem !important;
    }

    /* Tables - make them scrollable */
    .table-responsive {
        margin: 0 -1.5rem;
    }

    .table-salimex {
        font-size: 0.85rem;
    }

    .table-salimex thead th {
        padding: 0.8rem 0.6rem;
        font-size: 0.75rem;
    }

    .table-salimex tbody td {
        padding: 0.8rem 0.6rem;
    }

    /* Hide some columns on mobile for better readability */
    .table-salimex .mobile-hide {
        display: none;
    }

    /* Partner avatars smaller on mobile */
    .partner-avatar {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    /* Action buttons in tables */
    .action-buttons {
        opacity: 1;
        gap: 0.3rem;
    }

    .action-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    /* Detail lists */
    .detail-list dt {
        font-size: 0.8rem;
        padding: 0.8rem 0;
    }

    .detail-list dd {
        padding: 0.8rem 0;
        font-size: 0.9rem;
    }

    /* Status badges */
    .status-badge,
    .status-badge-large,
    .status-badge-delete {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    /* Buttons */
    .btn-salimex-primary,
    .btn-salimex-secondary,
    .btn-salimex-outline {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .action-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    /* Form labels and inputs */
    .form-label-salimex {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    .form-control-salimex,
    .form-select {
        font-size: 0.9rem;
        padding: 0.6rem 0.9rem;
    }

    /* Stat cards */
    .stat-card {
        padding: 1.5rem;
    }

    .stat-card .stat-icon {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.5rem;
    }

    .stat-card .stat-value {
        font-size: 2rem;
    }

    .stat-card .stat-label {
        font-size: 0.85rem;
    }

    /* Alerts */
    .alert {
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }

    /* Empty state */
    .empty-state i {
        font-size: 3rem;
    }

    .empty-state h5 {
        font-size: 1.1rem;
    }

    .empty-state p {
        font-size: 0.9rem;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 576px) {
    .page-header {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.3rem;
    }

    .card-body {
        padding: 1rem !important;
    }

    .btn-salimex-primary,
    .btn-salimex-secondary,
    .btn-salimex-outline {
        width: 100%;
        padding: 0.75rem;
    }

    .action-button {
        width: 100%;
    }

    /* Stack buttons vertically on very small screens */
    .d-flex.gap-2,
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.75rem !important;
    }

    .d-grid.gap-3 {
        gap: 0.75rem !important;
    }
}
