/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #FDFBD4;
    color: #660033;
    overflow-x: hidden;
}

/* LOGIN PAGE STYLES */
body.login-page {
    background: linear-gradient(135deg, #FDFBD4 0%, #F0EDB5 50%, #EFBF04 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(102, 0, 51, 0.15);
    width: 100%;
    max-width: 450px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #660033 0%, #EFBF04 50%, #660033 100%);
}

/* Login page specific logo section layout */
.login-page .logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
    gap: 0;
}

.logo {
    width: 260px;
    height: auto;
    margin-bottom: 0px;
}

.company-tagline {
    color: #6D8196;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
}

/* Login page specific tagline spacing */
.login-page .company-tagline {
    margin-top: 10px;
    margin-bottom: 20px;
}

.login-title {
    color: #660033;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.login-subtitle {
    color: #6D8196;
    font-size: 16px;
    margin-bottom: 40px;
}

/* Authentication Form Styles */
.auth-form {
    transition: all 0.3s ease;
}

.form-header {
    margin-bottom: 30px;
    text-align: center;
}

.form-header h2 {
    color: #660033;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-header p {
    color: #6D8196;
    font-size: 14px;
}

.password-requirements {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    font-size: 13px;
}

.password-requirements p {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #660033;
}

.password-requirements ul {
    margin: 0;
    padding-left: 20px;
    color: #6c757d;
}

.password-requirements li {
    margin: 3px 0;
}

.back-to-login {
    text-align: center;
    margin-top: 20px;
}

.back-to-login a {
    color: #6D8196;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-to-login a:hover {
    color: #EFBF04;
}

.login-button {
    width: 100%;
    background: linear-gradient(135deg, #660033 0%, #8B0042 100%);
    color: white;
    border: none;
    padding: 16px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 0, 51, 0.3);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Authentication Form Styles */
.auth-form {
    transition: all 0.3s ease;
}

.form-header {
    margin-bottom: 30px;
    text-align: center;
}

.form-header h2 {
    color: #660033;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-header p {
    color: #6D8196;
    font-size: 14px;
}

.password-requirements {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    font-size: 13px;
}

.password-requirements p {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #660033;
}

.password-requirements ul {
    margin: 0;
    padding-left: 20px;
    color: #6c757d;
}

.password-requirements li {
    margin: 3px 0;
}

.back-to-login {
    text-align: center;
    margin-top: 20px;
}

.back-to-login a {
    color: #6D8196;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-to-login a:hover {
    color: #EFBF04;
}

.forgot-password {
    color: #6D8196;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #EFBF04;
}

.forgot-password-container {
    text-align: center;
    margin-top: 20px;
}

.footer-text {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #E5E5E5;
    color: #6D8196;
    font-size: 12px;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6D8196;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.input-group .form-input {
    padding-right: 45px;
}

.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    color: #6D8196;
    font-size: 12px;
}

.security-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.terms-notice {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.terms-notice p {
    margin: 0;
    color: #666;
    font-size: 12px;
    line-height: 1.5;
}

.terms-notice a {
    color: #660033;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.terms-notice a:hover {
    color: #EFBF04;
    text-decoration: underline;
}

/* DASHBOARD STYLES */
body.dashboard-page {
    overflow-x: hidden;
}

/* Top Navigation Bar */
.top-nav {
    background: linear-gradient(135deg, #660033 0%, #8B0042 100%);
    color: white;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(102, 0, 51, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.mobile-nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Mobile Hamburger Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn.active {
    background: rgba(255, 255, 255, 0.2);
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100%;
    background: white;
    box-shadow: -5px 0 20px rgba(102, 0, 51, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-nav {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(135deg, #660033, #4d0026);
    color: white;
    box-shadow: 0 2px 10px rgba(102, 0, 51, 0.2);
}

.mobile-logo {
    height: 35px;
    width: auto;
}

.mobile-menu-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.mobile-nav-menu {
    flex: 1;
    list-style: none;
    padding: 20px 0;
    margin: 0;
}

.mobile-nav-item {
    margin-bottom: 8px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 16px 25px;
    color: #660033;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 16px;
    border-left: 4px solid transparent;
}

.mobile-nav-link:hover {
    background: linear-gradient(90deg, rgba(239, 191, 4, 0.1) 0%, rgba(239, 191, 4, 0.05) 100%);
    border-left-color: #EFBF04;
}

.mobile-nav-link.active {
    background: linear-gradient(90deg, rgba(102, 0, 51, 0.1) 0%, rgba(102, 0, 51, 0.05) 100%);
    border-left-color: #660033;
    font-weight: 600;
}

.mobile-nav-link.coming-soon {
    opacity: 0.6;
    position: relative;
}

.mobile-nav-link.coming-soon::after {
    content: "Soon";
    background: #6D8196;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    margin-left: auto;
}

.mobile-nav-icon {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    opacity: 0.7;
}

.mobile-nav-footer {
    padding: 20px;
    border-top: 1px solid #E5E5E5;
    background: #F8F9FA;
}

.mobile-user-info {
    margin-bottom: 15px;
}

.mobile-user-name {
    font-weight: 600;
    font-size: 16px;
    color: #660033;
    margin-bottom: 4px;
}

.mobile-user-email {
    font-size: 14px;
    color: #6D8196;
    opacity: 0.8;
}

.mobile-logout-btn {
    background: #EFBF04;
    color: #660033;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
}

.mobile-logout-btn:hover {
    background: #FFD700;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 191, 4, 0.3);
}

/* Dashboard/top-nav logo section layout */
.dashboard-page .logo-section,
.top-nav .logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-nav .logo {
    height: 45px;
    width: auto;
}

.company-name {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-left: 20px;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-email {
    font-size: 12px;
    opacity: 0.8;
}

.logout-btn {
    background: #EFBF04;
    color: #660033;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #FFD700;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 191, 4, 0.3);
}

/* Main Layout */
.main-container {
    display: flex;
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

/* Left Sidebar */
.sidebar {
    width: 280px;
    background: white;
    box-shadow: 2px 0 10px rgba(102, 0, 51, 0.1);
    padding: 30px 0;
    position: fixed;
    height: calc(100vh - 70px);
    left: 0;
    top: 70px;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 30px 15px 20px;
    color: #660033;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    border-left: 4px solid transparent;
}

.nav-link:hover {
    background: linear-gradient(90deg, rgba(239, 191, 4, 0.1) 0%, rgba(239, 191, 4, 0.05) 100%);
    border-left-color: #EFBF04;
    transform: translateX(5px);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(102, 0, 51, 0.1) 0%, rgba(102, 0, 51, 0.05) 100%);
    border-left-color: #660033;
    font-weight: 600;
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    opacity: 0.7;
}

/* Keep logo + title left-aligned */
.top-nav{gap:12px;}
.top-nav .logo-section{display:flex;align-items:center;gap:10px;}

/* On mobile we DO show the title, just make it smaller */
@media (max-width:768px){
  .company-name{display:block;font-size:18px;margin-left:8px;}
}   
    
/* Make sure desktop sidebar is hidden on mobile (already present, but keep) */
@media (max-width:768px){
  .sidebar{transform:translateX(-100%);transition:transform .3s ease;}
  .content-area{margin-left:0}
}

/* Content Area */
.content-area {
    flex: 1;
    margin-left: 280px;
    padding: 25px;
    min-height: calc(100vh - 70px);
}

.content-section {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(102, 0, 51, 0.1);
    margin-bottom: 30px;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

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

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #660033;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #EFBF04, #FFD700);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* QUERY AI LAYOUT STYLES */
.query-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.query-form-column {
    max-width: none;
    width: 100%;
    min-width: 0;
}

.ai-response-column {
    min-height: 600px;
}

.ai-response-panel {
    background: #F5F5F5;
    border-radius: 12px;
    border: 2px solid #E0E0E0;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #D0D0D0;
    background: #EEEEEE;
    border-radius: 10px 10px 0 0;
}

.response-title {
    color: #660033;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.response-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.download-button {
    background: #660033;
    color: white;
    border: none;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-button:hover {
    background: #4d0026;
    transform: translateY(-1px);
}

.clear-button {
    background: #EFBF04;
    color: #660033;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.3s ease;
}

.clear-button:hover {
    background: #FFD700;
    transform: translateY(-1px);
}

.response-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    max-height: 540px;
}

.response-content.success-response {
    color: #333333;
    background: #F9F9F9;
}

.response-content.error-response {
    color: #F44336;
    background: #FFF5F5;
}

.placeholder-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888888;
    text-align: center;
    min-height: 300px;
}

.placeholder-icon {
    margin-bottom: 15px;
    opacity: 0.6;
}

.placeholder-text p {
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

/* Response content styling for rendered HTML */
.response-content h1,
.response-content h2,
.response-content h3,
.response-content h4,
.response-content h5,
.response-content h6 {
    color: #660033;
    margin: 1.2em 0 0.6em 0;
    line-height: 1.3;
}

.response-content h1 { font-size: 1.8em; font-weight: 700; }
.response-content h2 { font-size: 1.5em; font-weight: 600; }
.response-content h3 { font-size: 1.3em; font-weight: 600; }
.response-content h4 { font-size: 1.1em; font-weight: 500; }
.response-content h5 { font-size: 1em; font-weight: 500; }
.response-content h6 { font-size: 0.9em; font-weight: 500; }

.response-content p {
    margin: 0.8em 0;
    line-height: 1.6;
    color: #333333;
}

.response-content ul,
.response-content ol {
    margin: 0.8em 0;
    padding-left: 2em;
    color: #333333;
}

.response-content li {
    margin: 0.4em 0;
    line-height: 1.5;
}

.response-content strong,
.response-content b {
    color: #660033;
    font-weight: 600;
}

.response-content em,
.response-content i {
    font-style: italic;
    color: #555555;
}

.response-content code {
    background: #F0F0F0;
    border: 1px solid #D0D0D0;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #666666;
}

.response-content pre {
    background: #F5F5F5;
    border: 1px solid #D0D0D0;
    border-radius: 6px;
    padding: 15px;
    overflow-x: auto;
    margin: 1em 0;
}

.response-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: #333333;
}

.response-content blockquote {
    border-left: 4px solid #EFBF04;
    margin: 1em 0;
    padding: 0.5em 0 0.5em 1.5em;
    background: #FEFDF7;
    color: #555555;
    font-style: italic;
}

.response-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    border: 1px solid #D0D0D0;
}

.response-content th,
.response-content td {
    border: 1px solid #D0D0D0;
    padding: 8px 12px;
    text-align: left;
}

.response-content th {
    background: #F0F0F0;
    font-weight: 600;
    color: #660033;
}

.response-content a {
    color: #660033;
    text-decoration: underline;
}

.response-content a:hover {
    color: #EFBF04;
}

/* SHARED FORM STYLES */
.form-container {
    max-width: 600px;
}

/* Query form specific - allow full width */
.query-form-column .form-container {
    max-width: 100%;
    width: 100%;
}

.query-form-column .form-textarea {
    width: 100% !important;
    max-width: none !important;
    min-width: 100%;
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #660033;
    font-size: 14px;
}

/* Checkbox Group Styles */
.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 10px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: white;
}

.checkbox-item:hover {
    border-color: #EFBF04;
    background: #FEFDF7;
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: #EFBF04;
    cursor: pointer;
}

.checkbox-label {
    font-size: 14px;
    color: #660033;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.2;
}

.checkbox-item:has(input:checked) {
    border-color: #EFBF04;
    background: #FEFDF7;
    box-shadow: 0 2px 4px rgba(239, 191, 4, 0.2);
}

.form-input,
.form-select,
.form-file,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #D3D3D3;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}

/* Login page specific form input styling */
.login-page .form-input {
    padding: 15px 20px;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    font-size: 16px;
    background: #FAFAFA;
}

.login-page .form-input:focus {
    border-color: #EFBF04;
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 191, 4, 0.1);
    background: white;
}

.login-page .form-input::placeholder {
    color: #A0A0A0;
}

/* Dashboard form input styling */
.dashboard-page .form-input:focus,
.dashboard-page .form-select:focus,
.dashboard-page .form-textarea:focus {
    border-color: #EFBF04;
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 191, 4, 0.1);
}

.form-file {
    padding: 8px;
    cursor: pointer;
}

.form-button {
    background: linear-gradient(135deg, #EFBF04, #FFD700);
    color: #660033;
    border: none;
    padding: 14px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 191, 4, 0.3);
}

.form-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 191, 4, 0.4);
}

.form-button:active {
    transform: translateY(0);
}

/* Status Messages */
.status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
}

.status-success {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-error {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.error-message {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

/* Spinner */
.spinner-container {
    display: none;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    gap: 15px;
}

.spinner {
    border: 4px solid rgba(239, 191, 4, 0.3);
    border-top: 4px solid #EFBF04;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
}

/* Login page spinner */
.login-page .spinner {
    border: 3px solid rgba(239, 191, 4, 0.3);
    border-top: 3px solid #EFBF04;
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-text {
    font-weight: 500;
    color: #660033;
}

/* File Tree Panel Styles */
.document-management-layout {
    display: grid;
    grid-template-columns: minmax(500px, 1fr) 450px;
    gap: 20px;
    align-items: start;
}

.left-column-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.file-tree-panel {
    background: white;
    border-radius: 12px;
    border: 1px solid #E5E5E5;
    box-shadow: 0 2px 10px rgba(102, 0, 51, 0.08);
    overflow: hidden;
    height: fit-content;
    max-height: 600px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #660033, #4d0026);
    color: white;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.panel-icon {
    opacity: 0.9;
}

.refresh-tree-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-tree-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(180deg);
}

.file-tree-container {
    height: 500px;
    overflow: hidden;
    position: relative;
}

.file-tree-content {
    height: 100%;
    overflow-y: auto;
    padding: 8px 0;
}

.tree-loading,
.tree-empty,
.tree-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.tree-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #660033;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

.tree-empty p,
.tree-error p {
    font-weight: 600;
    margin: 12px 0 4px 0;
    color: #333;
}

.tree-empty span {
    font-size: 14px;
    opacity: 0.8;
}

.retry-btn {
    margin-top: 12px;
    padding: 8px 16px;
    background: #660033;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.retry-btn:hover {
    background: #4d0026;
}

/* Tree Item Styles */
.tree-item {
    position: relative;
}

.tree-node {
    display: grid;
    grid-template-columns: 20px 16px 1fr 130px 70px 24px;
    align-items: center;
    gap: 8px;
    padding: 6px 15px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-left: 3px solid transparent;
    min-height: 32px;
}

.tree-node:hover {
    background: #f8f9fa;
    border-left-color: #EFBF04;
}

.tree-node.selected {
    background: #fefdf7;
    border-left-color: #EFBF04;
}

.tree-node.project {
    font-weight: 600;
    color: #660033;
    background: #f9f9f9;
    grid-template-columns: 20px 16px 1fr 130px 70px 48px; /* Wider delete area for projects */
}

.tree-node.project:hover {
    background: #f0f0f0;
}

.tree-toggle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.tree-toggle:hover {
    background: rgba(102, 0, 51, 0.1);
}

.tree-toggle svg {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}

.tree-toggle.expanded svg {
    transform: rotate(90deg);
}

.tree-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.tree-icon.processing {
    animation: spin 1s linear infinite;
    opacity: 0.5;
}

.tree-icon.processing svg {
    fill: #EFBF04 !important;
}

/* Processing spinner for file tree */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
.tree-icon.processing {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #EFBF04;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    background: none;
    opacity: 1;
}

.tree-icon.processing svg {
    display: none;
}

.tree-label {
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.tree-node:hover .tree-label {
    white-space: normal;
    overflow: visible;
}

.tree-category {
    font-size: 11px;
    color: #660033;
    background: #fef7e6;
    padding: 2px 6px;
    border-radius: 10px;
    white-space: nowrap;
    font-weight: 600;
    border: 1px solid #EFBF04;
    text-align: center;
    width: 120px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tree-category.empty {
    color: #999;
    background: #f5f5f5;
    border: 1px solid #ddd;
    font-weight: normal;
}

/* Error file styling */
.tree-category.error,
.tree-category[data-type="Error"],
.tree-node:has(.tree-category:contains("Error")) .tree-category {
    color: white;
    background: #e74c3c;
    border: 1px solid #c0392b;
    font-weight: 600;
}

/* Strikethrough for error file names */
.tree-node:has(.tree-category:contains("Error")) .tree-label,
.tree-node.error .tree-label {
    text-decoration: line-through;
    color: #999;
    opacity: 0.7;
}

/* Alternative selector for browsers that don't support :has() */
.tree-category:contains("Error") {
    color: white !important;
    background: #e74c3c !important;
    border: 1px solid #c0392b !important;
    font-weight: 600 !important;
}

/* Error file styling when the category text exactly matches "Error" */
.tree-category {
    /* Add transition for smooth color changes */
    transition: all 0.3s ease;
}

.tree-category:contains("Error") + .tree-label,
.tree-category[title*="Error"] + .tree-label {
    text-decoration: line-through;
    color: #999;
    opacity: 0.7;
}

/* CSS class-based styling for error files (applied by JavaScript) */
.tree-node.error-file .tree-category {
    color: white !important;
    background: #e74c3c !important;
    border: 1px solid #c0392b !important;
    font-weight: 600 !important;
}

.tree-node.error-file .tree-label {
    text-decoration: line-through !important;
    color: #999 !important;
    opacity: 0.7 !important;
}

/* Error file hover states */
.tree-node.error-file:hover {
    background: #ffe6e6;
    border-left-color: #e74c3c;
}

.tree-node.error-file:hover .tree-label {
    opacity: 0.9 !important;
}

.tree-children {
    margin-left: 26px;
    border-left: 1px solid #e5e5e5;
    display: none;
}

.tree-children.expanded {
    display: block;
}

.file-info {
    font-size: 10px;
    color: #888;
    white-space: nowrap;
    font-weight: 500;
    text-align: right;
}

/* Delete Button Styles */
.delete-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
    width: 20px;
    height: 20px;
}

.tree-node:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: rgba(244, 67, 54, 0.1);
    transform: scale(1.1);
}

.delete-btn svg {
    width: 14px;
    height: 14px;
    fill: #999;
    transition: fill 0.2s ease;
}

.delete-btn:hover svg {
    fill: #f44336;
}

/* Project delete button */
.tree-node.project .delete-btn {
    width: 40px;
    height: 24px;
}

.tree-node.project .delete-btn svg {
    width: 16px;
    height: 16px;
}

.upload-form-panel {
    min-width: 0; /* Allows the panel to shrink if needed */
    transition: box-shadow 0.3s ease; /* Smooth transition for selection feedback */
}
.feature-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(102, 0, 51, 0.1);
    border-left: 4px solid #EFBF04;
}


/* Query form specific - allow full width */
.query-form-column .form-container {
    max-width: 100%;
    width: 100%;
}

.query-form-column .form-textarea {
    width: 100% !important;
    max-width: none !important;
    min-width: 100%;
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #660033;
    font-size: 14px;
}

/* Checkbox Group Styles */
.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 10px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: white;
}

.checkbox-item:hover {
    border-color: #EFBF04;
    background: #FEFDF7;
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: #EFBF04;
    cursor: pointer;
}

.checkbox-label {
    font-size: 14px;
    color: #660033;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.2;
}

.checkbox-item:has(input:checked) {
    border-color: #EFBF04;
    background: #FEFDF7;
    box-shadow: 0 2px 4px rgba(239, 191, 4, 0.2);
}

.form-input,
.form-select,
.form-file,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #D3D3D3;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}

/* Login page specific form input styling */
.login-page .form-input {
    padding: 15px 20px;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    font-size: 16px;
    background: #FAFAFA;
}

.login-page .form-input:focus {
    border-color: #EFBF04;
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 191, 4, 0.1);
    background: white;
}

.login-page .form-input::placeholder {
    color: #A0A0A0;
}

/* Dashboard form input styling */
.dashboard-page .form-input:focus,
.dashboard-page .form-select:focus,
.dashboard-page .form-textarea:focus {
    border-color: #EFBF04;
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 191, 4, 0.1);
}

.form-file {
    padding: 8px;
    cursor: pointer;
}

.form-button {
    background: linear-gradient(135deg, #EFBF04, #FFD700);
    color: #660033;
    border: none;
    padding: 14px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 191, 4, 0.3);
}

.form-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 191, 4, 0.4);
}

.form-button:active {
    transform: translateY(0);
}

/* Status Messages */
.status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
}

.status-success {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-error {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.error-message {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

/* Spinner */
.spinner-container {
    display: none;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    gap: 15px;
}

.spinner {
    border: 4px solid rgba(239, 191, 4, 0.3);
    border-top: 4px solid #EFBF04;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
}

/* Login page spinner */
.login-page .spinner {
    border: 3px solid rgba(239, 191, 4, 0.3);
    border-top: 3px solid #EFBF04;
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-text {
    font-weight: 500;
    color: #660033;
}

/* Settings Page Styles */
.settings-container {
    max-width: 800px;
}

.settings-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(102, 0, 51, 0.08);
    border: 1px solid #E5E5E5;
}

.settings-section-title {
    color: #660033;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 2px solid #EFBF04;
    padding-bottom: 10px;
}

.settings-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
    background: #F8F9FA;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #EFBF04;
}

.reasoning-control {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 25px;
}

.reasoning-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.reasoning-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.reasoning-option:hover {
    border-color: #EFBF04;
    background: #FEFDF7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 191, 4, 0.15);
}

.reasoning-option input[type="radio"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #EFBF04;
    cursor: pointer;
    margin-top: 2px;
}

.reasoning-option:has(input:checked) {
    border-color: #EFBF04;
    background: #FEFDF7;
    box-shadow: 0 0 0 1px #EFBF04;
}

.reasoning-option:has(input:checked)::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 12px;
    color: #EFBF04;
    font-weight: bold;
    font-size: 16px;
}

.reasoning-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.reasoning-title {
    font-weight: 600;
    color: #660033;
    font-size: 16px;
    line-height: 1.2;
}

.reasoning-subtitle {
    font-size: 13px;
    color: #888;
    line-height: 1.3;
}

.reasoning-indicator {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.indicator-track {
    width: 200px;
    height: 6px;
    background: linear-gradient(to right, #4CAF50 0%, #EFBF04 50%, #FF6B6B 100%);
    border-radius: 3px;
    position: relative;
}

.indicator-thumb {
    width: 16px;
    height: 16px;
    background: #660033;
    border-radius: 50%;
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    transition: left 0.3s ease;
    box-shadow: 0 2px 6px rgba(102, 0, 51, 0.3);
}

.indicator-labels {
    display: flex;
    justify-content: space-between;
    width: 200px;
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.settings-save-btn {
    margin-top: 10px;
}

.coming-soon {
    opacity: 0.6;
    position: relative;
}

.coming-soon::after {
    content: "Coming Soon";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #6D8196;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

/* LEGACY STYLES - keeping for compatibility */
h1 {
    color: #660033;
}

.container {
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.tab {
    display: inline-block;
    padding: 10px;
    cursor: pointer;
    margin: 0 10px;
    border-bottom: 2px solid transparent;
}

.active {
    border-bottom: 2px solid #efbf04;
    font-weight: bold;
}

input[type="text"], input[type="file"], select {
    padding: 10px;
    border: 1px solid #660033;
    border-radius: 4px;
    margin-bottom: 15px;
    width: 100%;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin: 10px 0 5px;
    font-weight: bold;
}

input[type="email"],
input[type="password"] {
    padding: 10px;
    border: 1px solid #660033;
    border-radius: 4px;
    margin-bottom: 15px;
}

button {
    background-color: #efbf04;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    background-color: #660033;
}

.error {
    color: red;
    margin-top: 10px;
}

.tab:hover {
    border-bottom: 2px solid #efbf04;
}

.tab-content {
    display: none;
}

.active-content {
    display: block;
}

/* File Preview Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: modalFadeIn 0.3s ease-out;
}

/* Delete Confirmation Modal */
.delete-modal {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 90vw;
    box-shadow: 0 20px 60px rgba(102, 0, 51, 0.3);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

.delete-modal-header {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.delete-modal-header svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.delete-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.delete-modal-content {
    padding: 25px;
}

.delete-modal-message {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 8px;
}

.delete-modal-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0 20px 0;
    border-left: 4px solid #f44336;
}

.delete-modal-item {
    font-weight: 600;
    color: #660033;
    font-size: 15px;
    margin-bottom: 8px;
}

.delete-modal-warning {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.delete-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
}

.delete-cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.delete-cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.delete-confirm-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
}

.delete-confirm-btn:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

.delete-confirm-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.delete-confirm-btn .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    display: inline-block;
}

.modal-container {
    background: white;
    border-radius: 16px;
    width: 90vw;
    height: 90vh;
    max-width: 1200px;
    max-height: 800px;
    box-shadow: 0 20px 60px rgba(102, 0, 51, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: linear-gradient(135deg, #660033, #4d0026);
    color: white;
    border-bottom: 1px solid #4d0026;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 20px;
}

.modal-controls {
    display: flex;
    gap: 10px;
}

.modal-download-btn,
.modal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.modal-download-btn:hover,
.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.modal-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-loading,
.modal-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: #666;
    padding: 40px;
}

.modal-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #660033;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.modal-error p {
    font-weight: 600;
    margin: 16px 0 8px 0;
    color: #333;
}

.modal-retry-btn {
    margin-top: 12px;
    padding: 8px 16px;
    background: #660033;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.modal-retry-btn:hover {
    background: #4d0026;
}

.file-preview-content {
    flex: 1;
    overflow: auto;
    padding: 0;
}

/* Text file content styling */
.text-content {
    padding: 25px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #fafafa;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 100%;
    overflow: auto;
}

/* PDF viewer styling */
.pdf-viewer {
    width: 100%;
    height: 100%;
    border: none;
    background: #f5f5f5;
}

.pdf-embed {
    width: 100%;
    height: 100%;
    border: none;
}

/* Document viewer for Word docs */
.document-viewer {
    padding: 25px;
    background: white;
    height: 100%;
    overflow: auto;
}

.document-viewer h1,
.document-viewer h2,
.document-viewer h3,
.document-viewer h4,
.document-viewer h5,
.document-viewer h6 {
    color: #660033;
    margin: 20px 0 10px 0;
    line-height: 1.3;
}

.document-viewer p {
    margin: 12px 0;
    line-height: 1.6;
    color: #333;
}

.document-viewer ul,
.document-viewer ol {
    margin: 12px 0;
    padding-left: 25px;
}

/* File type indicators */
.file-type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 10px;
}

.file-type-pdf {
    background: #ff4757;
    color: white;
}

.file-type-doc {
    background: #2f5597;
    color: white;
}

.file-type-txt {
    background: #747d8c;
    color: white;
}

/* Modal animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Notification animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Mobile modal styles */
@media (max-width: 768px) {
    .modal-container {
        width: 95vw;
        height: 95vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-title {
        font-size: 16px;
    }
    
    .text-content,
    .document-viewer {
        padding: 20px;
        font-size: 13px;
    }
}
/* Usage Tracking Styles */
.usage-summary-display {
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Usage display positioning adjustments */
.left-column-container .usage-summary-display {
    margin-top: 15px !important;
    margin-bottom: 0;
}

.ai-response-column .usage-summary-display {
    margin-top: 15px !important;
    margin-bottom: 0;
}

/* Ensure proper spacing for usage cards */
#page-usage-display {
    margin-top: 15px !important;
    padding-top: 15px;
}

#query-usage-display {
    margin-top: 15px !important;
    padding-top: 15px;
}

/* Additional spacing fallback */
.usage-summary-display {
    margin-top: 15px !important;
    padding-top: 15px;
}

.usage-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(102, 0, 51, 0.08);
}

.usage-card.unlimited {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-color: #28a745;
}

.usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.usage-header h4 {
    margin: 0;
    color: #660033;
    font-size: 16px;
    font-weight: 600;
}

.plan-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.plan-badge.basic {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    color: #d63031;
}

.plan-badge.professional {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: white;
}

.plan-badge.unlimited {
    background: linear-gradient(135deg, #00cec9, #00b894);
    color: white;
}

.usage-metrics {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.usage-metric {
    padding: 12px;
    border-radius: 8px;
    background: white;
    border: 1px solid #e9ecef;
}

.usage-metric.warning {
    background: #fff8e1;
    border-color: #ffc107;
}

.usage-metric.critical {
    background: #ffebee;
    border-color: #f44336;
}

.metric-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.metric-numbers {
    font-weight: 600;
    color: #660033;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #EFBF04, #FFD700);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.usage-metric.warning .progress-fill {
    background: linear-gradient(90deg, #ffc107, #ffeb3b);
}

.usage-metric.critical .progress-fill {
    background: linear-gradient(90deg, #f44336, #ff5722);
}

.metric-details {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.usage-limit-error {
    background: #ffebee;
    border: 1px solid #f44336;
    border-radius: 8px;
    padding: 20px;
}

.usage-limit-error .error-header h4 {
    color: #d32f2f;
    margin: 0 0 10px 0;
}

.usage-limit-error .error-message {
    margin-bottom: 15px;
}

.usage-limit-error .error-details {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.current-usage-summary {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.current-usage-summary h5 {
    margin: 0 0 10px 0;
    color: #660033;
}

.usage-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.usage-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.usage-item:last-child {
    border-bottom: none;
}

.error-suggestions {
    margin-top: 15px;
}

.error-suggestions h5 {
    margin: 0 0 10px 0;
    color: #660033;
}

.error-suggestions ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.6;
}

.error-suggestions li {
    margin-bottom: 5px;
}

/* Mobile responsive adjustments for usage tracking */
@media (max-width: 768px) {
    .usage-card {
        padding: 15px;
    }
    
    .usage-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .metric-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .metric-details {
        flex-direction: column;
        gap: 2px;
    }
}

/* END Usage Tracking Styles */

/* AI Disclaimer Styles */
.ai-disclaimer {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    margin-bottom: 0;
    border-left: 4px solid #f0ad4e;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
}

.ai-disclaimer p {
    margin: 0;
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    font-weight: 500;
}

.ai-disclaimer strong {
    color: #664d03;
    font-weight: 600;
}

/* Mobile responsive for disclaimer */
@media (max-width: 768px) {
    .ai-disclaimer {
        padding: 12px;
        margin-top: 15px;
    }
    
    .ai-disclaimer p {
        font-size: 13px;
        text-align: left;
    }
}

/* Dashboard Footer Styles */
.dashboard-footer {
    background: linear-gradient(135deg, #660033 0%, #4d0026 100%);
    color: white;
    padding: 20px 0;
    margin-top: 40px;
    box-shadow: 0 -2px 10px rgba(102, 0, 51, 0.2);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-links a:hover {
    color: #EFBF04;
    background: rgba(239, 191, 4, 0.1);
    border-color: #EFBF04;
    transform: translateY(-1px);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
}

/* Mobile responsive for dashboard footer */
@media (max-width: 768px) {
    .dashboard-footer {
        padding: 15px 0;
        margin-top: 30px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        padding: 0 20px;
        gap: 10px;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .footer-links a {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .footer-copyright {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .ai-disclaimer {
        padding: 10px;
    }
    
    .ai-disclaimer p {
        font-size: 12px;
    }
}

/* Subscription Info Styles */
.subscription-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 40px 20px;
    color: #666;
}

.subscription-content {
    animation: fadeIn 0.3s ease-in-out;
}

.subscription-active {
    background: linear-gradient(135deg, #f0f8f0 0%, #ffffff 100%);
    border: 1px solid #28a745;
    border-radius: 12px;
    padding: 25px;
}

.subscription-overview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.subscription-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #28a745;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #28a745;
}

.status-indicator.active {
    background: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
    animation: pulse 2s infinite;
}

.status-indicator.cancelled {
    background: #ffc107;
}

.status-indicator.expired {
    background: #dc3545;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(40, 167, 69, 0.1); }
    100% { box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2); }
}

.subscription-plan {
    color: #660033;
    font-size: 16px;
}

.subscription-plan strong {
    font-weight: 600;
}

.subscription-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.subscription-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.detail-label {
    font-weight: 500;
    color: #666;
}

.detail-value {
    font-weight: 600;
    color: #333;
}

.subscription-id {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.subscription-actions {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.cancel-subscription-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.cancel-subscription-btn:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.cancel-subscription-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.cancellation-note {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
    padding: 12px;
    background: #fff8e1;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
}

/* No Subscription Styles */
.subscription-none {
    text-align: center;
    padding: 40px 20px;
}

.no-subscription-message h4 {
    color: #660033;
    margin: 15px 0 10px 0;
}

.no-subscription-message p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.no-subscription-message a {
    color: #660033;
    text-decoration: none;
    font-weight: 600;
}

.no-subscription-message a:hover {
    color: #EFBF04;
}

/* Error Styles */
.subscription-error {
    text-align: center;
    padding: 40px 20px;
}

.error-message-container h4 {
    color: #dc3545;
    margin: 15px 0 10px 0;
}

.error-message-container p {
    color: #666;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.retry-subscription-btn {
    background: #660033;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.retry-subscription-btn:hover {
    background: #4d0026;
}

/* Cancel Subscription Modal */
.cancel-subscription-modal {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90vw;
    box-shadow: 0 20px 60px rgba(102, 0, 51, 0.3);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

.cancel-modal-header {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cancel-modal-header svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.cancel-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.cancel-modal-content {
    padding: 25px;
}

.cancel-modal-message {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
    font-weight: 500;
}

.cancel-modal-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #dc3545;
}

.cancel-detail-item {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.cancel-detail-item:last-child {
    margin-bottom: 0;
}

.cancel-detail-item strong {
    color: #660033;
}

.cancel-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 12px;
    margin-top: 15px;
}

.cancel-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
}

.cancel-action-btn {
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
}

.cancel-action-btn.secondary {
    background: #6c757d;
    color: white;
}

.cancel-action-btn.secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.cancel-action-btn.primary {
    background: #dc3545;
    color: white;
}

.cancel-action-btn.primary:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.cancel-action-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.cancel-action-btn .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    display: inline-block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .subscription-overview {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .subscription-detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 6px 0;
    }
    
    .cancel-modal-actions {
        flex-direction: column;
    }
    
    .cancel-action-btn {
        width: 100%;
    }
}

@media (max-width: 1200px) {
    .query-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .ai-response-panel {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Hide desktop sidebar */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .content-area {
        margin-left: 0;
        padding: 20px;
    }
    
    .top-nav {
        padding: 0 15px;
    }
    
    .user-info {
        display: none;
    }
    
    /* Adjust company name for mobile */
    .company-name {
        font-size: 16px;
        margin-left: 8px;
    }

    .login-container {
        padding: 30px 25px;
        margin: 10px;
    }
    
    .logo {
        width: 150px;
    }
    
    .login-title {
        font-size: 28px;
    }
    
    .query-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ai-response-panel {
        min-height: 300px;
    }
    
    .response-content {
        max-height: 300px;
    }
    
    /* Mobile checkbox layout */
    .checkbox-group {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .checkbox-item {
        padding: 8px 10px;
    }
    
    /* Mobile document management layout */
    .document-management-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .left-column-container {
        order: 2;
    }
    
    .file-tree-panel {
        max-height: 400px;
    }
    
    .upload-form-panel {
        order: 1;
    }
    
    /* Mobile settings layout */
    .reasoning-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .reasoning-option {
        padding: 15px;
    }
    
    .indicator-track {
        width: 150px;
    }
    
    .indicator-labels {
        width: 150px;
    }
    
    /* Mobile modal adjustments */
    .modal-container {
        width: 95vw;
        height: 95vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-title {
        font-size: 16px;
    }
    
    .text-content,
    .document-viewer {
        padding: 20px;
        font-size: 13px;
    }

    /* Mobile navigation specific adjustments */
    .mobile-nav {
        width: 100vw;
        max-width: 100vw;
    }
    
    .mobile-nav-header {
        padding: 15px 20px;
    }
    
    .mobile-nav-link {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .mobile-nav-footer {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .top-nav {
        padding: 0 10px;
    }
    
    .mobile-nav-left {
        gap: 10px;
    }
    
    .company-name {
        font-size: 14px;
        margin-left: 6px;
    }
    
    .top-nav .logo {
        height: 35px;
    }
    
    .mobile-menu-btn {
        width: 35px;
        height: 35px;
    }
    
    .hamburger-line {
        width: 20px;
        height: 2px;
    }
    
    .content-area {
        padding: 15px;
    }
    
    .section-title {
        font-size: 22px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .section-icon {
        width: 32px;
        height: 32px;
    }
}

/* ===== ENHANCED SUBSCRIPTION STATUS STYLES ===== */

/* Improved cancellation pending status styling */
.status-indicator.cancelled {
    background: #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
    animation: pulseWarning 2s infinite;
}

.subscription-status-badge.cancelled {
    color: #856404 !important;
    background: linear-gradient(135deg, #fff8e1, #fffbf0) !important;
    border: 1px solid #ffc107 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-weight: 600 !important;
}

/* Cancellation pending pulse animation */
@keyframes pulseWarning {
    0% { 
        box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2); 
    }
    50% { 
        box-shadow: 0 0 0 6px rgba(255, 193, 7, 0.1); 
    }
    100% { 
        box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2); 
    }
}

/* Enhanced subscription details for cancelled status */
.subscription-active.cancellation-pending {
    background: linear-gradient(135deg, #fff8e1 0%, #fffbf0 100%);
    border: 1px solid #ffc107;
}

.subscription-active.cancellation-pending .subscription-overview {
    border-bottom-color: #ffc107;
}

/* Enhanced cancel button states */
.cancel-subscription-btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
    background: #6c757d !important;
    color: white !important;
}

.cancel-subscription-btn:disabled:hover {
    background: #6c757d !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Enhanced status text styling */
#subscription-status-text {
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
}

/* Plan name styling */
.subscription-plan #subscription-plan-name {
    color: #660033;
    font-weight: 600;
}

/* Detail rows enhancement */
.subscription-detail-row {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s ease;
}

.subscription-detail-row:hover {
    background: rgba(239, 191, 4, 0.05);
    border-radius: 4px;
    padding-left: 8px;
    padding-right: 8px;
}

.subscription-detail-row:last-child {
    border-bottom: none;
}

/* Enhanced success/error messages */
.status-message.status-success::before {
    content: "✓";
    font-weight: bold;
    color: #2e7d32;
    margin-right: 4px;
}

.status-message.status-error::before {
    content: "⚠";
    font-weight: bold;
    color: #c62828;
    margin-right: 4px;
}

/* Mobile responsive adjustments for enhanced subscription styles */
@media (max-width: 768px) {
    .subscription-status-badge.cancelled {
        padding: 4px 8px !important;
        font-size: 14px;
    }
    
    #subscription-status-text {
        font-size: 14px;
    }
    
    .subscription-detail-row {
        padding: 8px 0;
    }
    
    .subscription-detail-row:hover {
        padding-left: 4px;
        padding-right: 4px;
    }
}

/* ===== TEAM MANAGEMENT / INVITE USER STYLES ===== */
.invite-form-container {
    max-width: 600px;
}

.invite-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 15px;
}

.invite-input-group .form-input {
    flex: 1;
    margin: 0;
}

.invite-button {
    background: linear-gradient(135deg, #660033, #8B0042);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    min-width: 140px;
    justify-content: center;
}

.invite-button:hover {
    background: linear-gradient(135deg, #4d0026, #660033);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 0, 51, 0.3);
}

.invite-button:active {
    transform: translateY(0);
}

.invite-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.invite-button svg {
    flex-shrink: 0;
}

/* Mobile responsive for invite form */
@media (max-width: 768px) {
    .invite-input-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .invite-button {
        min-width: auto;
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .invite-form-container {
        max-width: 100%;
    }
    
    .invite-input-group {
        gap: 6px;
    }
    
    /* Small mobile footer adjustments */
    .dashboard-footer {
        margin-top: 20px;
    }
    
    .footer-links {
        gap: 10px;
    }
    
    .footer-links a {
        font-size: 12px;
        padding: 5px 8px;
    }
    
    .footer-copyright {
        font-size: 12px;
    }
}

/* ===== MULTI-SUBSCRIPTION CARD STYLES ===== */
.subscription-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.subscription-card:hover {
    box-shadow: 0 4px 16px rgba(102, 0, 51, 0.12);
    transform: translateY(-2px);
}

.subscription-card.cancellation-pending {
    background: linear-gradient(135deg, #fff8e1 0%, #fffbf0 100%);
    border: 1px solid #ffc107;
}

.subscription-card .subscription-overview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.subscription-card.cancellation-pending .subscription-overview {
    border-bottom-color: #ffc107;
}

.subscription-card .subscription-details {
    margin-bottom: 20px;
}

.subscription-card .subscription-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.subscription-card .subscription-detail-row:last-child {
    border-bottom: none;
}

.subscription-card .subscription-detail-row:hover {
    background: rgba(239, 191, 4, 0.05);
    border-radius: 4px;
    padding-left: 8px;
    padding-right: 8px;
}

.subscription-card .detail-label {
    font-weight: 500;
    color: #666;
    font-size: 14px;
}

.subscription-card .detail-value {
    font-weight: 600;
    color: #660033;
    font-size: 14px;
}

.subscription-card .subscription-actions {
    margin-top: 20px;
}

.subscription-card .cancel-subscription-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.subscription-card .cancel-subscription-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.subscription-card .cancel-subscription-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    background: #6c757d;
}

.subscription-card .cancellation-note {
    margin-top: 12px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* Mobile responsive for subscription cards */
@media (max-width: 768px) {
    .subscription-card {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .subscription-card .subscription-overview {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .subscription-card .subscription-detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 8px 0;
    }
    
    .subscription-card .cancel-subscription-btn {
        width: 100%;
        justify-content: center;
    }
}
