@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #f4f6f9;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --color-accent: #0284c7; /* Sky Blue */
    --color-accent-hover: #0369a1;
    --color-success: #10b981; /* Emerald */
    --color-warning: #f59e0b; /* Amber */
    --color-danger: #ef4444;  /* Rose */
    --color-info: #0ea5e9;    /* Sky */
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.05), 0 4px 15px -2px rgba(0, 0, 0, 0.02);
    --transition: all 0.2s ease-in-out;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Panel Containers */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.glass-panel:hover {
    box-shadow: var(--shadow-md);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--color-accent-hover);
}

/* Form Inputs */
input, select, textarea {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    padding: 8px 12px;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: var(--transition);
    gap: 6px;
}

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

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

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

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

/* Table Action Buttons & Icon Utilities */
.icon-svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
    vertical-align: middle;
}
.icon-svg-large {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
    vertical-align: middle;
}

.action-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
    user-select: none;
}

/* Icon-only button */
.btn-action-icon {
    width: 32px;
    padding: 0;
}

/* Button with text */
.btn-action-text {
    padding: 0 12px;
    gap: 6px;
}

/* Success / Complete */
.btn-action-success {
    background-color: #dcfce7;
    color: #15803d;
    border-color: #bbf7d0;
}
.btn-action-success:hover {
    background-color: #bbf7d0;
    color: #166534;
}

/* Alert / Warning */
.btn-action-warning {
    background-color: #fef3c7;
    color: #b45309;
    border-color: #fde68a;
}
.btn-action-warning:hover {
    background-color: #fde68a;
    color: #92400e;
}

/* Edit / Secondary */
.btn-action-secondary {
    background-color: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}
.btn-action-secondary:hover {
    background-color: #e2e8f0;
    color: #334155;
}

/* Danger / Delete */
.btn-action-danger {
    background-color: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}
.btn-action-danger:hover {
    background-color: #fecaca;
    color: #991b1b;
}

/* Clean SVG Icon Inside Action Button */
.btn-action svg, .menu-link svg, .app-header svg, .service-card svg {
    flex-shrink: 0;
}

/* Authentication */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: #f1f5f9;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 30px;
}

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(2, 132, 199, 0.1);
    border: 1px solid rgba(2, 132, 199, 0.2);
    color: var(--color-accent);
    font-size: 1.3rem;
    font-weight: bold;
}

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

.error-text {
    color: var(--color-danger);
    font-size: 0.75rem;
    margin-top: 4px;
    display: block;
}

/* App Grid Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #0f172a; /* Navy Slate */
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-logo {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    color: #ffffff;
    padding-left: 8px;
}

.sidebar-logo span {
    color: #38bdf8; /* sky-400 */
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.menu-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
}

.menu-link.active {
    background: rgba(2, 132, 199, 0.15);
    color: #38bdf8;
    border-left: 3px solid var(--color-accent);
}

.sidebar-profile {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.profile-info {
    flex-grow: 1;
    overflow: hidden;
}

.profile-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-role {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
}

.logout-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.logout-btn:hover {
    color: var(--color-danger);
}

/* Content Area */
.content-panel {
    margin-left: 250px;
    width: calc(100% - 250px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Collapsed State */
.sidebar-collapsed .sidebar {
    transform: translateX(-250px);
}
.sidebar-collapsed .content-panel {
    margin-left: 0;
    width: 100%;
}

.app-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-title h1 {
    font-size: 1.3rem;
}

.header-title p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.app-body {
    padding: 30px;
    flex-grow: 1;
}

/* Dashboard Cards & Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.grad-card {
    padding: 20px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    min-height: 130px;
    height: auto;
    color: white;
}

.grad-card-inner {
    display: flex;
    justify-content: space-between;
    height: 100%;
}

.grad-card-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
    flex: 1;
}

.grad-card-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
    min-width: 80px;
}

.grad-card h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    margin-bottom: 5px;
}

.grad-card .value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    position: relative;
    z-index: 2;
}

.grad-card .label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 2px;
}

.grad-card .card-icon {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.15;
}

.grad-card .card-icon svg {
    width: 80px;
    height: 80px;
}

.grad-card .card-actions {
    margin-top: auto;
    display: flex;
    gap: 6px;
}

.grad-card .btn-card {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 5px 10px;
    font-size: 0.72rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.grad-card .btn-card:hover {
    background: rgba(255, 255, 255, 0.35);
}

.grad-card-1 {
    background: linear-gradient(135deg, #0284c7, #06b6d4); /* Sky to Cyan */
}
.grad-card-2 {
    background: linear-gradient(135deg, #4f46e5, #2563eb); /* Indigo to Blue */
}
.grad-card-3 {
    background: linear-gradient(135deg, #64748b, #334155); /* Slate to Dark Slate */
}
.grad-card-4 {
    background: linear-gradient(135deg, #10b981, #14b8a6); /* Emerald to Teal */
}

/* Key Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(2, 132, 199, 0.25);
}

.service-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.service-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.new-badge {
    background: var(--color-danger);
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Tables */
.custom-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
    background: #ffffff;
}

.custom-table th {
    background: #f8fafc;
    padding: 12px 18px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.custom-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.custom-table tr:hover td {
    background: #f8fafc;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--color-danger); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--color-warning); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--color-success); }
.badge-info { background: rgba(14, 165, 233, 0.1); color: var(--color-info); }
.badge-secondary { background: rgba(100, 116, 139, 0.1); color: var(--text-secondary); }

/* Layout Split */
.layout-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1200px) {
    .layout-split {
        grid-template-columns: 1fr;
    }
}

.right-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Sticky Yellow Note */
.sticky-note {
    background: #fef08a; /* Soft Yellow */
    border: 1px solid #fde047;
    color: #713f12;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.sticky-note h4 {
    color: #713f12;
    margin-bottom: 8px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Latest Updates Feed */
.updates-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.update-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.update-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.update-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}
.update-title:hover {
    color: var(--color-accent);
}

.update-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Floating Call buttons matching ComplyRelax */
.floating-call {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background: #0ea5e9;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
    cursor: pointer;
    transition: var(--transition);
    z-index: 999;
}
.floating-call:hover {
    transform: scale(1.1);
}

.chat-bubble-mascot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid var(--border-color);
}
.chat-mascot-img {
    width: 32px;
    height: 32px;
}
.chat-mascot-txt {
    font-size: 0.75rem;
    font-weight: 600;
}
.chat-mascot-sub {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* Drag and Drop Handle Styling */
.drag-handle {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    opacity: 0.5;
    transition: var(--transition);
    cursor: grab;
}
tr:hover .drag-handle {
    opacity: 1;
    color: var(--text-secondary);
}

.header-shortcut-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition);
}

.header-shortcut-btn:hover {
    color: var(--text-primary);
    background-color: #f1f5f9;
}

/* Premium Segmented Tab Selector */
.tabs-buttons {
    display: inline-flex;
    gap: 6px;
    background: #f8fafc;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: #f1f5f9;
}

.tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-accent), var(--color-info));
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    transform: translateY(-1px);
}

/* Premium Pagination Styling (Ultra-Modern SaaS Design) */
nav[role="navigation"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

/* Hide mobile simple view on desktop */
nav[role="navigation"] > div:first-child {
    display: none;
}

nav[role="navigation"] > div:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

nav[role="navigation"] p {
    margin: 0;
    color: var(--text-secondary, #64748b);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Main Wrapper */
nav[role="navigation"] span.relative.z-0.inline-flex {
    display: inline-flex;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color, #e2e8f0);
    overflow: hidden;
    padding: 4px;
    gap: 4px;
}

/* All Buttons (Links and Spans) */
nav[role="navigation"] span.relative.z-0.inline-flex a,
nav[role="navigation"] span.relative.z-0.inline-flex > span {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary, #475569);
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    cursor: pointer;
}

/* Remove weird inner borders from default Laravel html */
nav[role="navigation"] span.relative.z-0.inline-flex * {
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

/* Inner elements for nested spans */
nav[role="navigation"] span.relative.z-0.inline-flex > span > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Hover State for Links */
nav[role="navigation"] span.relative.z-0.inline-flex a:hover {
    background-color: #f1f5f9;
    color: var(--color-primary, #0f172a);
}

/* Active Page Style */
nav[role="navigation"] span[aria-current="page"] {
    background: linear-gradient(135deg, var(--color-accent, #3b82f6), var(--color-info, #0ea5e9)) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

nav[role="navigation"] span[aria-current="page"] * {
    color: #ffffff !important;
}

/* Disabled Arrows Style */
nav[role="navigation"] span[aria-disabled="true"] {
    color: #cbd5e1 !important;
    background-color: transparent !important;
    cursor: not-allowed !important;
    opacity: 0.5;
}

/* Constraint on Icons */
nav[role="navigation"] svg {
    width: 18px !important;
    height: 18px !important;
}
