/* Root Variables */
:root {
    --primary-color: #2196f3;
    --secondary-color: #1976d2;
    --danger-color: #f44336;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --card-bg: #fff;
    --border-color: #ddd;
    --shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Font Face Definitions */
@font-face {
    font-family: 'NotoSans';
    src: url('../fonts/NotoSans-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NotoSansTelugu';
    src: url('../fonts/NotoSansTelugu-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NotoSansDevanagari';
    src: url('../fonts/NotoSansDevanagari-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Language-specific font classes */
body[data-language="en"] {
    font-family: 'NotoSans', sans-serif;
}

body[data-language="te"] {
    font-family: 'NotoSansTelugu', 'NotoSans', sans-serif;
}

body[data-language="hi"] {
    font-family: 'NotoSansDevanagari', 'NotoSans', sans-serif;
}

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

body {
    font-family: 'NotoSans', sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
    line-height: 1.6;
}

/* Lock Screen */
.lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lock-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.lock-container h1 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.lock-container input {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
}

.lock-container button {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
}

.lock-container button:hover {
    background: var(--secondary-color);
}

.error-message {
    color: var(--danger-color);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Main App Layout */
header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-left h1 {
    font-size: 1.5rem;
}

.header-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-right select,
.header-right button {
    padding: 0.5rem;
    border: none;
    border-radius: 5px;
    font-family: inherit;
    cursor: pointer;
}

.header-right button {
    background: rgba(255,255,255,0.2);
    color: white;
}

.header-right button:hover {
    background: rgba(255,255,255,0.3);
}

main {
    display: flex;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    padding: 1rem;
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    overflow-y: auto;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar button {
    padding: 0.8rem;
    background: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-color);
    transition: background 0.3s;
}

.sidebar button:hover {
    background: rgba(33, 150, 243, 0.1);
}

/* Content Area */
.content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

/* Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.stat-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
}

/* Input Methods */
.input-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.method-card {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.method-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.method-card input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px dashed var(--border-color);
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

.method-card button {
    width: 100%;
    padding: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
}

.method-card button:hover {
    background: var(--secondary-color);
}

/* Text Boxes */
.text-box,
.data-box {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    margin: 1rem 0;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.data-box {
    font-family: monospace;
}

/* Client Cards */
.client-card {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.client-card:hover {
    transform: translateY(-2px);
}

.client-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.client-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.client-summary {
    font-size: 0.95rem;
}

/* Export Options */
.export-options {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.export-options h3 {
    margin-bottom: 1rem;
}

.export-options button {
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
}

.export-options button:hover {
    background: var(--secondary-color);
}

/* Search Results */
#searchResults,
#clientsList {
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar button span {
        display: none;
    }
    
    .content {
        margin-left: 60px;
    }
    
    .input-methods {
        grid-template-columns: 1fr;
    }
    
    header {
        padding: 1rem;
    }
    
    .header-left h1 {
        font-size: 1.2rem;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

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

/* Error Messages */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.alert-error {
    background: #ffebee;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.alert-success {
    background: #e8f5e9;
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    border-left: 2px solid var(--primary-color);
    padding-left: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0;
    width: 1rem;
    height: 1rem;
    background: var(--primary-color);
    border-radius: 50%;
}

.timeline-date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.timeline-content {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 5px;
    box-shadow: var(--shadow);
}