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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    -webkit-font-smoothing: antialiased;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 50px 40px;
    width: 100%;
    max-width: 450px;
}

.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
}

.logo h1 {
    font-size: 32px;
    color: #1a202c;
    margin-bottom: 8px;
}

.tagline {
    color: #718096;
    font-size: 16px;
}

.login-form {
    margin-bottom: 30px;
}

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

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

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.error-message {
    background: #fed7d7;
    border: 1px solid #fc8181;
    color: #c53030;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #718096;
    font-size: 13px;
}

.security-badge svg {
    color: #48bb78;
}

/* Dashboard Styles */
.dashboard {
    background: #f7fafc;
    min-height: 100vh;
}

.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.header-title h1 {
    font-size: 24px;
    color: #1a202c;
    margin-bottom: 4px;
}

.header-title p {
    font-size: 14px;
    color: #718096;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.banner.warning {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
}

.banner.info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.card-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 24px;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s;
}

.btn-secondary:hover {
    transform: translateY(-2px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-content h3 {
    font-size: 14px;
    color: #718096;
    margin-bottom: 8px;
}

.stat-content p {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.blue {
    background: #e6f2ff;
    color: #3182ce;
}

.stat-icon.green {
    background: #e6ffed;
    color: #38a169;
}

.stat-icon.purple {
    background: #f3e8ff;
    color: #805ad5;
}

.action-card {
    text-align: center;
    padding: 40px;
}

.action-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e6f2ff 0%, #d6eaff 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #3182ce;
}

.action-card h2 {
    font-size: 24px;
    color: #1a202c;
    margin-bottom: 12px;
}

.action-card p {
    color: #718096;
    margin-bottom: 24px;
    font-size: 16px;
}

.btn-large {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.list-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.list-item:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-item-content h4 {
    font-size: 16px;
    color: #1a202c;
    margin-bottom: 4px;
}

.list-item-content p {
    font-size: 14px;
    color: #718096;
}

.list-item-meta {
    font-size: 12px;
    color: #a0aec0;
    margin-top: 8px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge.success {
    background: #c6f6d5;
    color: #276749;
}

.badge.inactive {
    background: #e2e8f0;
    color: #4a5568;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
}

.empty-state svg {
    margin: 0 auto 16px;
    opacity: 0.5;
}

/* Transcription Page */
.transcription-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.recording-controls {
    text-align: center;
    padding: 40px;
}

.record-button {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.record-button.recording {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    animation: pulse 2s infinite;
}

.record-button:hover {
    transform: scale(1.05);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(252, 129, 129, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(252, 129, 129, 0);
    }
}

.record-status {
    color: #718096;
    font-size: 14px;
}

textarea {
    width: 100%;
    min-height: 300px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.output-container {
    position: relative;
}

.copy-button {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.copy-button:hover {
    background: #edf2f7;
}

.output-content {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    min-height: 400px;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.8;
    color: #2d3748;
}

/* Admin Panel */
.admin-section {
    margin-bottom: 40px;
}

.form-inline {
    background: #e6f2ff;
    border: 1px solid #bee3f8;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.form-row input,
.form-row select {
    padding: 10px 14px;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    font-size: 14px;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 12px;
}

.btn-cancel {
    padding: 10px 20px;
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-cancel:hover {
    background: #cbd5e0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a5568;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.admin-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
}

.admin-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.admin-item-actions {
    display: flex;
    gap: 8px;
}

.btn-icon-only {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon-only.edit {
    background: #e6f2ff;
    color: #3182ce;
}

.btn-icon-only.edit:hover {
    background: #bee3f8;
}

.btn-icon-only.delete {
    background: #fed7d7;
    color: #e53e3e;
}

.btn-icon-only.delete:hover {
    background: #fc8181;
    color: white;
}

.admin-item-info h4 {
    font-size: 16px;
    color: #1a202c;
    margin-bottom: 6px;
}

.admin-item-info p {
    font-size: 14px;
    color: #718096;
    margin-bottom: 4px;
}

.admin-item-meta {
    font-size: 12px;
    color: #a0aec0;
    margin-top: 8px;
}

.toggle-button {
    margin-top: 12px;
    padding: 6px 12px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-button.on {
    background: #c6f6d5;
    color: #276749;
}

.toggle-button.off {
    background: #e2e8f0;
    color: #4a5568;
}

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

    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
