/* NEXTPAY - Premium Light-Themed Agent Console Stylesheet */

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

:root {
    --bg-page: #f8fafc;
    --bg-panel: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-input: #ffffff;
    --border-color: #e2e8f0;
    
    --accent-orange: #f97316;
    --accent-orange-hover: #ea580c;
    --accent-orange-bg: #fff7ed;
    
    --accent-green: #10b981;
    --accent-green-hover: #059669;
    --accent-green-bg: #ecfdf5;
    
    --accent-red: #ef4444;
    --accent-red-hover: #dc2626;
    --accent-red-bg: #fef2f2;
    
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-blue-bg: #eff6ff;

    --text-dark: #0f172a;
    --text-main: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --sidebar-width: 280px;
    --transition-speed: 0.3s;
    --shadow-soft: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-medium: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-page);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Login Screen Overlay */
.agent-login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    padding: 32px;
    box-shadow: var(--shadow-medium);
    animation: fadeIn 0.4s ease-out;
}

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

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo-img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-soft);
}

.login-header h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.login-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.input-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.input-field-group label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-field-group input {
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--text-dark);
    font-size: 14.5px;
    outline: none;
    transition: border-color var(--transition-speed);
}

.input-field-group input:focus {
    border-color: var(--accent-orange);
}

.btn-login-submit {
    width: 100%;
    background: var(--accent-orange);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 700;
    font-family: var(--font-heading);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.2);
    transition: background var(--transition-speed), transform 0.1s;
    margin-top: 8px;
}

.btn-login-submit:hover {
    background: var(--accent-orange-hover);
}

.btn-login-submit:active {
    transform: scale(0.98);
}

/* Main Layout Grid */
.agent-container {
    display: flex;
    width: 100%;
    height: 100vh;
    position: relative;
}

/* Sidebar Drawer Navigation */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-panel);
    border-right: 1.5px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 100;
    transition: transform var(--transition-speed) ease;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1.5px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.sidebar-brand-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 18px;
    color: var(--text-dark);
}

.sidebar-menu {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.menu-item:hover {
    color: var(--text-dark);
    background-color: var(--bg-hover);
}

.menu-item.active {
    color: var(--accent-orange);
    background-color: var(--accent-orange-bg);
}

.menu-item-icon {
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-badge-live {
    margin-left: auto;
    font-size: 9px;
    background: var(--accent-orange);
    color: white;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.sidebar-footer {
    padding: 20px 12px;
    border-top: 1.5px solid var(--border-color);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px;
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.btn-logout:hover {
    background: var(--accent-red-bg);
    border-color: #fca5a5;
    color: var(--accent-red);
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Topbar Header */
.topbar {
    height: 64px;
    background-color: var(--bg-panel);
    border-bottom: 1.5px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-main);
    cursor: pointer;
    padding: 4px;
}

.topbar-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 50%;
    transition: background var(--transition-speed);
}

.topbar-icon-btn:hover {
    background-color: var(--bg-hover);
}

.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #3f6212; /* circular dark green avatar */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    font-family: var(--font-heading);
    box-shadow: var(--shadow-soft);
}

/* Sidebar Responsive Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.4);
    z-index: 95;
    backdrop-filter: blur(2px);
}

/* Workspace Panels */
.workspace-panel {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: none;
    flex-direction: column;
    gap: 20px;
}

.workspace-panel.active {
    display: flex;
}

/* Metrics Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bg-panel);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-soft);
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
}

.stat-subtext {
    font-size: 11px;
    color: var(--text-light);
}

/* Card Box Layout */
.card-box {
    background: var(--bg-panel);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.welcome-box {
    border-left: 4px solid var(--accent-orange);
}

/* Customer Tab Header Row */
.panel-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-bar-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 320px;
}

.search-bar-wrapper input {
    width: 100%;
    background-color: var(--bg-hover);
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px 8px 32px;
    font-size: 13px;
    color: var(--text-dark);
    outline: none;
    transition: all var(--transition-speed);
}

.search-bar-wrapper input:focus {
    border-color: var(--text-light);
    background-color: var(--bg-panel);
}

.search-icon {
    position: absolute;
    left: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Grids and Controls */
.control-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.control-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.control-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-input);
    color: var(--text-dark);
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition-speed);
}

.control-input:focus {
    border-color: var(--accent-orange);
}

/* Buttons */
.btn-primary {
    background: var(--accent-orange);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background var(--transition-speed);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

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

.btn-success {
    background-color: var(--accent-green);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.btn-success:hover {
    background-color: var(--accent-green-hover);
}

.btn-danger {
    background-color: var(--accent-red);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.btn-danger:hover {
    background-color: var(--accent-red-hover);
}

/* Responsive Table Styling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-panel);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.custom-table th {
    background-color: var(--bg-page);
    color: var(--text-muted);
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 1.5px solid var(--border-color);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.custom-table td {
    padding: 12px 16px;
    border-bottom: 1.5px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

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

.custom-table tbody tr:hover td {
    background-color: var(--bg-hover);
}

/* Customer Tab Avatar cell styling */
.customer-avatar-cell {
    display: flex;
    justify-content: center;
    align-items: center;
}

.customer-circle-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #3b82f6; /* default blue background for customers */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13.5px;
}

/* Basic Info Cell content */
.customer-info-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    line-height: 1.4;
}

.customer-info-box div {
    display: flex;
    gap: 6px;
}

.customer-info-box strong {
    color: var(--text-dark);
}

.customer-info-box span {
    color: var(--text-muted);
}

/* Badges */
.badge {
    padding: 2.5px 8px;
    border-radius: 4px;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
}

.badge.pending {
    background-color: var(--accent-blue-bg);
    color: var(--accent-blue);
}

.badge.success {
    background-color: var(--accent-green-bg);
    color: var(--accent-green);
}

.badge.danger {
    background-color: var(--accent-red-bg);
    color: var(--accent-red);
}

/* Queue List layout */
.queue-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.queue-card {
    background: var(--bg-panel);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-soft);
}

.queue-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.queue-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
}

.queue-card-meta div {
    display: flex;
    justify-content: space-between;
}

.queue-card-meta strong {
    color: var(--text-muted);
}

.queue-card-meta span {
    color: var(--text-dark);
    font-weight: 500;
}

.queue-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    align-items: center;
}

/* Receipt Preview Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    z-index: 1010;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-panel);
    border: 1.5px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    padding: 24px;
    box-shadow: var(--shadow-medium);
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: var(--text-light);
    cursor: pointer;
}

.modal-close-btn:hover {
    color: var(--text-dark);
}

.modal-preview-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000000;
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    min-height: 260px;
}

.modal-preview-wrapper img {
    max-width: 100%;
    max-height: 45vh;
    object-fit: contain;
}

/* Toast Notifications Container */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1100;
}

.toast {
    background: var(--bg-panel);
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 18px;
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { border-left: 4px solid var(--accent-green); }
.toast.error { border-left: 4px solid var(--accent-red); }
.toast.info { border-left: 4px solid var(--accent-blue); }

.toast-icon { font-size: 16px; }
.toast-message { font-size: 12.5px; font-weight: 600; color: var(--text-dark); }

/* Responsive styles */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        z-index: 100;
        box-shadow: var(--shadow-medium);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .hamburger-btn {
        display: block;
    }
    
    .workspace-panel {
        padding: 16px;
    }
}

/* Google Translate widget customization */
.translate-widget {
    display: inline-block;
    vertical-align: middle;
}
.goog-te-gadget-simple {
    background-color: var(--bg-hover) !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 4px 8px !important;
    font-size: 13px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}
.goog-te-gadget-simple img {
    display: none !important;
}
.goog-te-gadget-icon {
    display: none !important;
}
.goog-te-menu-value {
    color: var(--text-main) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    margin: 0 !important;
}
.goog-te-menu-value span {
    color: var(--text-main) !important;
}
.goog-te-menu-value span:nth-child(3) {
    display: none !important;
}
.goog-te-menu-value span:nth-child(5) {
    display: none !important;
}
.goog-te-menu-frame {
    box-shadow: var(--shadow-medium) !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: 8px !important;
}
.skiptranslate iframe {
    display: none !important; /* hides the google top frame banner */
}
body {
    top: 0px !important; /* overrides top margin added by google translate */
}

/* Custom slide toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background-color: var(--accent-orange);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-orange);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

.custom-table td div {
    white-space: nowrap;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
