/* ===================================
   Admin Panel CSS - Web2Print
   Company Color: #dc2626 (Red)
   =================================== */

/* Stats Cards */
.stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: #dc2626;
}

.stats-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Section Titles */
.section-title {
    color: #2d3748;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #dc2626;
    display: inline-block;
}

.admin-section-title {
    color: #2d3748;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dc2626;
}

/* Admin Tool Cards */
.admin-tool-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
}

.admin-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.admin-tool-card .card-header {
    background: #dc2626;
    color: white;
    font-weight: 600;
    padding: 15px;
    border: none;
}

.admin-tool-card .card-body {
    padding: 20px;
    background: #fafafa;
}

.admin-tool-icon {
    font-size: 3rem;
    color: #dc2626;
    margin-bottom: 15px;
}

/* Upload Box */
.upload-box {
    border: 2px dashed #ccc;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    background: white;
}

.upload-box:hover {
    border-color: #dc2626;
    background: #fff5f5;
    transform: translateY(-2px);
}

.upload-label {
    color: #dc2626;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 10px;
}

.upload-icon {
    font-size: 48px;
    color: #dc2626;
}

.upload-text {
    margin-top: 15px;
    font-weight: 600;
}

/* Log Output */
.log-output {
    background: #1e1e1e;
    color: #0f0;
    padding: 15px;
    border-radius: 4px;
    font-family: monospace;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 12px;
}

/* Success/Error Messages */
.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
}

/* Progress */
.admin-progress {
    height: 30px;
    border-radius: 8px;
    background: #e2e8f0;
}

.admin-progress .progress-bar {
    background: #dc2626;
    font-weight: 600;
}

.progress-text {
    font-weight: 600;
    color: #2d3748;
}

/* Generate Button */
.generate-btn {
    font-size: 1.1rem;
    padding: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Template Editor Styles */
.editor-tabs .nav-link {
    color: #718096;
    padding: 0.75rem 1.5rem;
    border: none;
    font-weight: 500;
}

.editor-tabs .nav-link.active {
    color: #dc2626;
    border-bottom: 3px solid #dc2626;
    background: transparent;
}

.editor-tabs .nav-link:hover {
    color: #dc2626;
}

.editor-label {
    color: #dc2626;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: block;
}

.editor-textarea {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    min-height: 700px;
    line-height: 1.5;
}

.format-example {
    background: rgba(0,0,0,0.05);
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.btn-save {
    background-color: #dc2626;
    border-color: #dc2626;
    color: white;
    font-size: 1.05rem;
    padding: 0.7rem 2rem;
    font-weight: 600;
}

.btn-save:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
    color: white;
}

/* QR Analyzer Styles */
.loading-indicator {
    text-align: center;
    padding: 20px;
}

.qr-result-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.color-preview {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 1px solid #000;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.updated-files {
    background: white;
    padding: 1rem;
    border-radius: 8px;
}

.error-output {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    max-height: 300px;
    overflow-y: auto;
}

/* Font Manager Styles */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.stat-number-primary {
    color: #3b82f6;
}

.stat-number-success {
    color: #10b981;
}

.stat-number-danger {
    color: #dc2626;
}

.stat-number-warning {
    color: #f59e0b;
}

.stat-number-secondary {
    color: #64748b;
}

.stat-label {
    color: #718096;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.dropbox-area {
    border: 3px dashed #cbd5e0;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dropbox-area:hover {
    border-color: #dc2626;
    background: #fff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

.dropbox-area.dragover {
    border-color: #dc2626;
    background: #fff5f5;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.dropbox-icon {
    font-size: 4rem;
    color: #dc2626;
    margin-bottom: 1rem;
}

.dropbox-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.dropbox-subtext {
    font-size: 0.9rem;
    color: #718096;
}

.file-selected {
    padding: 1rem;
    background: #d4edda;
    border-left: 3px solid #10b981;
    border-radius: 8px;
}

.font-checkbox {
    cursor: pointer;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
}

.font-checkbox:hover {
    border-color: #cbd5e0;
    background: #f8f9fa;
}

.font-missing-card {
    border-left: 3px solid #dc2626;
}

/* Font Checker Styles */
.font-item {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 4px solid;
}

.font-complete {
    background: #f0fdf4;
    border-left-color: #16a34a;
}

.font-partial {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.font-missing {
    background: #fef2f2;
    border-left-color: #dc2626;
}

.font-standard {
    background: #f8fafc;
    border-left-color: #64748b;
}

.format-badge {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: 600;
}

.format-woff2 {
    background: #dbeafe;
    color: #1e40af;
}

.format-woff {
    background: #e0e7ff;
    color: #4338ca;
}

/* Log Viewer Styles */
.log-container {
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    padding: 1.5rem;
    border-radius: 8px;
    max-height: 600px;
    overflow-y: auto;
    line-height: 1.6;
}

.log-line {
    margin-bottom: 0.25rem;
}

/* New Structured Log Entry Styles */
.log-entry {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.log-time {
    color: #888;
    font-size: 11px;
    min-width: 70px;
}

.log-icon {
    min-width: 20px;
}

.log-message {
    flex: 1;
}

.log-data {
    margin-top: 0.5rem;
    margin-left: 90px;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 11px;
}

.log-data pre {
    margin: 0;
    color: #bbb;
}

.log-info {
    background: rgba(156, 220, 254, 0.1);
    color: #9cdcfe;
}

.log-info .log-icon {
    color: #9cdcfe;
}

.log-success {
    background: rgba(78, 201, 176, 0.1);
    color: #4ec9b0;
}

.log-success .log-icon {
    color: #4ec9b0;
}

.log-warning {
    background: rgba(220, 220, 170, 0.1);
    color: #dcdcaa;
}

.log-warning .log-icon {
    color: #dcdcaa;
}

.log-error {
    background: rgba(244, 135, 113, 0.1);
    color: #f48771;
    font-weight: 600;
}

.log-error .log-icon {
    color: #f48771;
}

/* Card Overrides for Admin */

.admin-card-header {
  background: #dc2626;
  border-bottom: none;
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  color: #ffffff;
}


.admin-main-card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
}

/* Template Editor - Full Height Editor Container */
.editor-body {
    padding: 1.5rem;
    background: #f8f9fa;
    min-height: calc(100vh - 250px);
}

.editor-container {
    height: 100%;
}

.editor-header {
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.editor-container .editor-textarea {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 13px;
    min-height: 700px;
    height: max(700px, calc(100vh - 400px));
    line-height: 1.6;
    background: #ffffff;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 1rem;
    resize: vertical;
}

.editor-container .editor-textarea:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Config Selection Buttons */
.btn-outline-primary {
    border-color: #cbd5e0;
    color: #2d3748;
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    background-color: #f8f9fa;
    border-color: #dc2626;
    color: #dc2626;
}

.btn-outline-primary.active,
.btn-primary {
    background-color: #dc2626;
    border-color: #dc2626;
    color: white;
}

.btn-primary:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

/* Alert Styles */
.alert-sm {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}
