/* Pudubrews Beantagger v2.2.3 - Frontend Styles */

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

img {
    max-width: 100% !important;
    height: auto !important;
    max-height: 100vh !important;
}

/* Emergency logo fix */
img[src="/BeanTaggerLogo.png"] {
    max-height: 80px !important;
    max-width: 200px !important;
    height: 80px !important;
    width: auto !important;
    object-fit: contain !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #6B4E3D 0%, #3C2A21 50%, #8B4513 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/* Coffee background elements for main app */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(107, 78, 61, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 69, 19, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(107, 78, 61, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Header */
.header {
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.app-branding {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.header-coffee-icon {
    font-size: 3em;
    animation: bounce 2s infinite ease-in-out;
}

.app-branding h1 {
    font-size: 2.2em;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #6B4E3D, #8B4513);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    color: #666;
    font-size: 1em;
    margin: 0;
    font-weight: 500;
}

/* User Info Section Styles */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #6B4E3D;
    font-weight: 500;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}

/* Standardized header button styles */
.header-btn {
    background: linear-gradient(135deg, #6B4E3D, #8B4513);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 40px;
    height: 40px;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(107, 78, 61, 0.2);
}

.header-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 78, 61, 0.3);
}

.history-btn {
    /* Inherit all header-btn styles */
}

/* User Account Menu Styles */
.user-account-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.user-account-btn {
    background: linear-gradient(135deg, #6B4E3D, #8B4513);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 40px;
    height: 40px;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(107, 78, 61, 0.2);
}

.user-account-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 78, 61, 0.3);
}

.user-icon {
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.user-account-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.user-account-main {
    font-size: 1em;
    font-weight: 600;
}

.user-account-sub {
    font-size: 0.75em;
    opacity: 0.9;
    font-weight: 400;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-header {
    padding: 16px;
    background: linear-gradient(135deg, rgba(107, 78, 61, 0.05), rgba(139, 69, 19, 0.05));
    border-bottom: 1px solid #e9ecef;
}

.dropdown-header .user-email {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.dropdown-actions {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dropdown-btn {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: #f8f9fa;
    color: #2c3e50;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.dropdown-btn:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.dropdown-btn.btn-upgrade {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.dropdown-btn.btn-upgrade:hover {
    background: linear-gradient(135deg, #218838, #1ea082);
    transform: translateX(2px);
}

.dropdown-btn.btn-signout {
    background: #dc3545;
    color: white;
    margin-top: 4px;
}

.dropdown-btn.btn-signout:hover {
    background: #c82333;
    transform: translateX(2px);
}

/* Stripe Integration Styles (PRD v2.4.3) */
.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.user-email {
    font-weight: 500;
    color: #6B4E3D;
}

.subscription-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
}

.subscription-status.active {
    background: #28a745;
    color: white;
}

.subscription-status.free {
    background: #6c757d;
    color: white;
}

.btn-upgrade {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-upgrade:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.user-info button {
    background: linear-gradient(135deg, #6B4E3D, #8B4513);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-info button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 78, 61, 0.3);
}

.version {
    color: #7f8c8d;
    font-size: 1.1em;
    font-weight: 500;
}

/* Main Layout */
.main {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

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

/* Form Section */
.form-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-section h2 {
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 1.8em;
}

.section-label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.field-description {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-style: italic;
}

/* Template Selector */
.template-selector {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #6B4E3D;
}

.template-dropdown {
    width: 100%;
    max-width: 300px;
    padding: 10px 15px;
    font-size: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.template-dropdown:hover {
    border-color: #6B4E3D;
}

.template-dropdown:focus {
    outline: none;
    border-color: #6B4E3D;
    box-shadow: 0 0 0 3px rgba(107, 78, 61, 0.1);
}

/* Size Selector */
.size-selector {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #6B4E3D;
}

.size-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.size-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.size-option:hover {
    border-color: #6B4E3D;
    transform: translateY(-2px);
}

.size-option input[type="radio"] {
    margin-right: 8px;
    accent-color: #6B4E3D;
}

.size-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: #6B4E3D;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px dashed #6B4E3D;
}

.drop-zone {
    background: white;
    border: 3px dashed #bdc3c7;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #6B4E3D;
    background: #f8f9ff;
    transform: scale(1.02);
}

.drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.drop-icon {
    font-size: 3em;
    opacity: 0.7;
}

.drop-zone h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3em;
}

.drop-zone p {
    margin: 0;
    color: #7f8c8d;
}

.drop-divider {
    color: #bdc3c7;
    font-weight: 600;
    position: relative;
    padding: 0 20px;
}

.drop-divider::before,
.drop-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 50px;
    height: 1px;
    background: #bdc3c7;
}

.drop-divider::before {
    left: -60px;
}

.drop-divider::after {
    right: -60px;
}

.upload-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-upload {
    background: #6B4E3D;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-upload:hover {
    background: #5A3A2A;
    transform: translateY(-2px);
}

.url-input-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #e67e22;
}

.url-input-section label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.url-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.url-input-group input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
}

.url-input-group input:focus {
    outline: none;
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.btn-extract {
    background: #e67e22;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-extract:hover {
    background: #d35400;
    transform: translateY(-2px);
}

.btn-extract:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.upload-status {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 500;
}

.upload-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.upload-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.upload-status.processing {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.upload-status.warning {
    background: #fcf4dd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Field Groups */
.field-group {
    margin-bottom: 30px;
}

.field-group h3 {
    background: linear-gradient(135deg, #6B4E3D, #8B4513);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.field {
    display: flex;
    flex-direction: column;
}

.field-wide {
    grid-column: 1 / -1;
}

.field label {
    font-weight: 600;
    color: #34495e;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.field input,
.field textarea {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
    background: white;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: #6B4E3D;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.field input.error,
.field textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.error-msg {
    color: #e74c3c;
    font-size: 0.85em;
    margin-top: 5px;
    font-weight: 500;
    display: none;
}

.error-msg.show {
    display: block;
}

/* Actions */
.actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #6B4E3D, #8B4513);
    color: white;
}

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

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

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn-download {
    background: #27ae60;
    color: white;
}

.btn-download:hover {
    background: #219a52;
    transform: translateY(-2px);
}

/* Results Section */
.results-section {
    position: sticky;
    top: 20px;
}

.results-section h2 {
    margin-bottom: 20px;
    color: white;
    font-size: 1.8em;
    text-align: center;
}

.status-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.status-card h3 {
    margin-bottom: 15px;
    font-size: 1.3em;
}

/* Loading State */
.loading {
    text-align: center;
    border-left: 4px solid #f39c12;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f39c12;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Success State */
.success {
    border-left: 4px solid #27ae60;
}

.success h3 {
    color: #27ae60;
}

.success-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.success-details p {
    margin-bottom: 8px;
}

.download-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Error State */
.error {
    border-left: 4px solid #e74c3c;
}

.error h3 {
    color: #e74c3c;
}

.error-list {
    background: #fdf2f2;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.error-item {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 5px;
    border-left: 3px solid #e74c3c;
}

.error-help {
    color: #7f8c8d;
    font-style: italic;
}

/* Warning styles */
.warning-notice {
    margin-bottom: 15px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

.warning-notice h4 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 14px;
}

.warning-item {
    margin-bottom: 8px;
    padding: 6px 10px;
    background: white;
    border-radius: 4px;
    border-left: 3px solid #f39c12;
    color: #856404;
    font-size: 13px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
    padding: 5px;
}

.close-btn:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9em;
    overflow-x: auto;
    white-space: pre-wrap;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
}

#api-status {
    font-weight: 600;
}

#api-status.online {
    color: #2ecc71;
}

#api-status.offline {
    color: #e74c3c;
}

/* Preview Section - PRD v2.2.3 */
.preview-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.preview-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.preview-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
}

.preview-container {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.label-preview {
    border: 1px solid #dee2e6;
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.preview-status {
    margin-top: 15px;
    color: #6c757d;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .field-grid {
        grid-template-columns: 1fr;
    }
    
    .size-options {
        flex-direction: column;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .download-actions {
        flex-direction: column;
    }
}

/* Authentication Styles */
.auth-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #6B4E3D 0%, #3C2A21 50%, #8B4513 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow: hidden;
}

.auth-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 600px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
    animation: slideUp 0.6s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.coffee-icon {
    font-size: 4em;
    margin-bottom: 16px;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.auth-header h1 {
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #6B4E3D, #8B4513);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: #666;
    font-size: 1.1em;
    font-weight: 500;
}

.auth-description {
    text-align: center;
    color: #555;
    margin-bottom: 28px;
    font-size: 1.05em;
    line-height: 1.4;
}

.auth-form h2 {
    font-size: 1.8em;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2c3e50;
    text-align: center;
    line-height: 1.2;
}

.signin-description {
    text-align: center;
    color: #666;
    margin-bottom: 32px;
    font-size: 1.05em;
}

.signin-form {
    space-y: 24px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group:last-of-type {
    margin-bottom: 24px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    font-size: 1.2em;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1.05em;
    background: #fafbfc;
    transition: all 0.3s ease;
    outline: none;
    color: #2c3e50;
}

.input-wrapper input::placeholder {
    color: transparent;
    transition: color 0.3s ease;
}

.input-wrapper input:focus {
    border-color: #6B4E3D;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(107, 78, 61, 0.1);
}

.input-wrapper input:focus::placeholder {
    color: #aaa;
}

.input-wrapper input:focus + label,
.input-wrapper input:not(:placeholder-shown) + label {
    transform: translateY(-32px) translateX(-4px) scale(0.85);
    color: #6B4E3D;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.9);
    padding: 0 6px;
    border-radius: 4px;
}

.input-wrapper label {
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1em;
    transition: all 0.3s ease;
    pointer-events: none;
    background: transparent;
    white-space: nowrap;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 24px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.auth-tab.active {
    background: white;
    color: #6B4E3D;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    color: #6B4E3D;
}

.auth-form-container {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Magic Link Authentication Styles (PRD v2.4.3) */
.auth-toggle {
    text-align: center;
    margin: 15px 0;
}

.toggle-link {
    color: #6B4E3D;
    text-decoration: none;
    font-size: 0.9em;
    cursor: pointer;
}

.toggle-link:hover {
    text-decoration: underline;
}

.legacy-signin {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(107, 78, 61, 0.2);
}

.auth-success {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.3);
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 0.9em;
}

.magic-link-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(107, 78, 61, 0.05);
    border-radius: 8px;
    border-left: 4px solid #6B4E3D;
}

.magic-link-info p {
    margin: 8px 0;
    color: #555;
    font-size: 0.9em;
    line-height: 1.4;
}

.magic-link-info strong {
    color: #6B4E3D;
}

/* Auth buttons - Fixed spacing and consistency */
.auth-btn, .signin-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #6B4E3D, #8B4513);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 24px;
    min-height: 48px;
}

.auth-btn:hover, .signin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(107, 78, 61, 0.3);
}

.auth-btn:active, .signin-btn:active {
    transform: translateY(0);
}

.auth-btn.secondary {
    background: rgba(107, 78, 61, 0.1);
    color: #6B4E3D;
    border: 2px solid rgba(107, 78, 61, 0.3);
    margin-top: 16px;
}

.auth-btn.secondary:hover {
    background: rgba(107, 78, 61, 0.2);
    border-color: rgba(107, 78, 61, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(107, 78, 61, 0.2);
}

.btn-icon {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.auth-btn:hover .btn-icon, .signin-btn:hover .btn-icon {
    transform: translateX(4px);
}

.auth-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    font-size: 0.95em;
    display: none;
}

.auth-error:not(:empty) {
    display: block;
    animation: shake 0.5s ease-in-out;
}

.auth-success {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    font-size: 0.95em;
    display: none;
}

.auth-success:not(:empty) {
    display: block;
    animation: slideIn 0.3s ease-in-out;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.auth-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e1e5e9;
}

.features {
    display: flex;
    justify-content: space-around;
    gap: 16px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 0.9em;
}

.feature-icon {
    font-size: 1.5em;
    margin-bottom: 4px;
}

.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.coffee-beans {
    position: relative;
    width: 100%;
    height: 100%;
}

.bean {
    position: absolute;
    font-size: 2em;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.bean-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.bean-2 {
    top: 20%;
    right: 15%;
    animation-delay: 1s;
}

.bean-3 {
    bottom: 30%;
    left: 20%;
    animation-delay: 2s;
}

.bean-4 {
    bottom: 20%;
    right: 20%;
    animation-delay: 3s;
}

.bean-5 {
    top: 50%;
    left: 5%;
    animation-delay: 4s;
}

.bean-6 {
    top: 70%;
    right: 5%;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .auth-container {
        margin: 20px;
        padding: 32px 24px;
    }
    
    .auth-header h1 {
        font-size: 1.8em;
    }
    
    .coffee-icon {
        font-size: 3em;
    }
    
    .input-wrapper input {
        padding: 14px 12px 14px 46px;
        font-size: 1em;
    }
    
    .input-icon {
        left: 14px;
        font-size: 1.1em;
    }
    
    .input-wrapper label {
        left: 46px;
        font-size: 0.95em;
    }
    
    .features {
        flex-direction: column;
        gap: 12px;
    }
    
    .feature {
        flex-direction: row;
        justify-content: center;
    }
}

/* Mobile responsive for main app */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .app-branding {
        flex-direction: column;
        gap: 8px;
    }
    
    .user-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        min-width: 250px;
    }
}
    
    .header-coffee-icon {
        font-size: 2.5em;
    }
    
    .app-branding h1 {
        font-size: 1.8em;
    }
    
    .header-subtitle {
        font-size: 0.9em;
    }
}

/* Logo Styling (Sprint 2.4.0) */
.header-logo {
    height: 50px;
    width: auto;
    margin-right: 15px;
}

.auth-logo {
    height: 80px !important;
    width: auto !important;
    max-height: 80px !important;
    max-width: 200px !important;
    margin-bottom: 15px;
    object-fit: contain !important;
    display: block !important;
}

/* Plan Selection Styles - Sprint v2.4.4 */
.plan-selection {
    margin: 24px 0 32px 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    border: 1px solid rgba(107, 78, 61, 0.1);
}

.plan-header-section {
    text-align: center;
    margin-bottom: 20px;
}

.plan-selection h3 {
    color: #2c3e50;
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 8px;
}

.plan-help-text {
    color: #666;
    font-size: 0.9em;
    margin: 0;
}

.plan-help-link {
    color: #6B4E3D;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.plan-help-link:hover {
    color: #8B4513;
    text-decoration: underline;
}

/* Auth Plan Comparison Modal */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.auth-modal {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.auth-modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3em;
}

.auth-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-close:hover {
    color: #666;
}

.auth-modal-content {
    padding: 20px;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.comparison-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.comparison-table tr:hover {
    background: #f8f9fa;
}

.comparison-recommendation {
    margin-top: 20px;
    padding: 16px;
    background: rgba(107, 78, 61, 0.05);
    border-radius: 8px;
    border-left: 4px solid #6B4E3D;
}

.comparison-recommendation p {
    margin: 8px 0;
    font-size: 0.9em;
}


.plan-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.plan-card {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 340px;
}

.plan-card:hover {
    border-color: #6B4E3D;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 78, 61, 0.15);
}

.plan-card.selected {
    border-color: #6B4E3D;
    background: rgba(107, 78, 61, 0.02);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 78, 61, 0.2);
}

.plan-card.premium {
    border-color: #8B4513;
    position: relative;
}

.plan-card.premium:hover,
.plan-card.premium.selected {
    border-color: #8B4513;
    background: rgba(139, 69, 19, 0.02);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.2);
}

.plan-header {
    text-align: center;
    margin-bottom: 16px;
}

.plan-header h4 {
    font-size: 1.4em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.plan-price {
    font-size: 2em;
    font-weight: 800;
    color: #6B4E3D;
}

.plan-card.premium .plan-price {
    color: #8B4513;
}

.plan-price span {
    font-size: 0.5em;
    font-weight: 500;
    color: #666;
}

.plan-features {
    margin-bottom: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature {
    padding: 4px 0;
    font-size: 0.9em;
    color: #2c3e50;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.feature.limited {
    color: #999;
}

.plan-badge {
    text-align: center;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    color: #6B4E3D;
    background: rgba(107, 78, 61, 0.1);
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}

.plan-badge.recommended {
    background: linear-gradient(135deg, #8B4513, #6B4E3D);
    color: white;
    position: relative;
    white-space: nowrap;
    min-width: fit-content;
}

.plan-badge.recommended::before {
    content: "⭐";
    margin-right: 4px;
}

/* Plan card selection indicator */
.plan-card.selected::after {
    content: "✓";
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: #6B4E3D;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.plan-card.premium.selected::after {
    background: #8B4513;
}

/* Mobile responsiveness for plan cards */
@media (max-width: 768px) {
    .plan-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .plan-selection {
        margin: 16px 0 24px 0;
        padding: 16px;
    }
    
    .plan-card {
        padding: 16px;
    }
    
    .plan-header h4 {
        font-size: 1.2em;
    }
    
    .plan-price {
        font-size: 1.6em;
    }
}

/* Payment Modal Styles */
.payment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
}

.payment-modal {
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.payment-header {
    text-align: center;
    margin-bottom: 24px;
}

.payment-header h3 {
    font-size: 1.6em;
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 8px;
}

.payment-header p {
    color: #666;
    font-size: 1.1em;
}

.premium-benefits {
    background: rgba(107, 78, 61, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.premium-benefits h4 {
    color: #6B4E3D;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

.benefit {
    padding: 4px 0;
    color: #2c3e50;
    font-size: 0.95em;
}

.benefit-price {
    text-align: center;
    font-size: 1.4em;
    font-weight: 700;
    color: #8B4513;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(107, 78, 61, 0.2);
}

.payment-actions {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.payment-btn {
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-btn.primary {
    background: linear-gradient(135deg, #8B4513, #6B4E3D);
    color: white;
}

.payment-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4);
}

.payment-btn.secondary {
    background: rgba(107, 78, 61, 0.1);
    color: #6B4E3D;
    border: 1px solid rgba(107, 78, 61, 0.3);
}

.payment-btn.secondary:hover {
    background: rgba(107, 78, 61, 0.2);
}

.payment-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

@media (max-width: 480px) {
    .payment-modal {
        margin: 20px;
        padding: 24px;
    }
    
    .payment-actions {
        gap: 8px;
    }
}

/* Plan Comparison Section Styles - Sprint v2.4.4 */
.plan-comparison-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 32px;
    margin: 32px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.comparison-header {
    text-align: center;
    margin-bottom: 32px;
}

.comparison-header h2 {
    color: #2c3e50;
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 8px;
}

.comparison-header p {
    color: #666;
    font-size: 1.2em;
}

.usage-calculator {
    background: rgba(107, 78, 61, 0.05);
    border-radius: 15px;
    padding: 24px;
    margin-bottom: 32px;
}

.usage-calculator h3 {
    color: #6B4E3D;
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.calculator-inputs {
    display: grid;
    gap: 20px;
    margin-bottom: 24px;
}

.calculator-inputs .input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calculator-inputs .input-group.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.calculator-inputs label {
    color: #2c3e50;
    font-weight: 500;
    font-size: 1em;
}

.range-input {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: rgba(107, 78, 61, 0.2);
    border-radius: 5px;
    outline: none;
}

.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #6B4E3D;
    border-radius: 50%;
    cursor: pointer;
}

.range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #6B4E3D;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.range-value {
    display: inline-block;
    background: #6B4E3D;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    align-self: flex-start;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: #6B4E3D;
}

.usage-result {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid rgba(107, 78, 61, 0.1);
}

.estimated-usage {
    font-size: 1.2em;
    color: #2c3e50;
    margin-bottom: 16px;
}

.recommendation-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 12px;
}

.recommendation-badge.free {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 2px solid rgba(34, 197, 94, 0.3);
}

.recommendation-badge.premium {
    background: rgba(139, 69, 19, 0.1);
    color: #8B4513;
    border: 2px solid rgba(139, 69, 19, 0.3);
}

.comparison-table {
    margin-bottom: 32px;
}

.comparison-table h3 {
    color: #2c3e50;
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.features-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.features-table th,
.features-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.features-table th {
    background: rgba(107, 78, 61, 0.05);
    font-weight: 600;
    color: #2c3e50;
}

.plan-column {
    text-align: center;
    width: 30%;
}

.plan-column.free {
    background: rgba(34, 197, 94, 0.02);
}

.plan-column.premium {
    background: rgba(139, 69, 19, 0.02);
}

.plan-price {
    font-size: 0.9em;
    color: #666;
    margin-top: 4px;
}

.feature-name {
    font-weight: 500;
    color: #2c3e50;
}

.features-table td.free {
    color: #16a34a;
    text-align: center;
    font-weight: 500;
}

.features-table td.premium {
    color: #8B4513;
    text-align: center;
    font-weight: 500;
}

.comparison-actions {
    text-align: center;
    display: flex;
    gap: 16px;
    justify-content: center;
}

.comparison-actions .btn {
    padding: 14px 28px;
    font-size: 1.1em;
    border-radius: 10px;
}

/* Mobile responsiveness for plan comparison */
@media (max-width: 768px) {
    .plan-comparison-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .comparison-header h2 {
        font-size: 1.8em;
    }
    
    .features-table {
        font-size: 0.9em;
    }
    
    .features-table th,
    .features-table td {
        padding: 12px 8px;
    }
    
    .plan-column {
        width: 25%;
    }
    
    .comparison-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .comparison-actions .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Plan Compare Button */
.plan-compare-btn {
    margin: 0 8px !important;
}

@media (max-width: 768px) {
    .plan-compare-btn {
        margin: 4px 0 !important;
        display: block;
        width: 100%;
    }
}

/* Subscription Management Styles - Sprint v2.4.4 */
.subscription-management-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 32px;
    margin: 32px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.subscription-header {
    text-align: center;
    margin-bottom: 32px;
}

.subscription-header h2 {
    color: #2c3e50;
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 8px;
}

.subscription-header p {
    color: #666;
    font-size: 1.2em;
}

.current-subscription {
    background: rgba(139, 69, 19, 0.05);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 2px solid rgba(139, 69, 19, 0.1);
}

.subscription-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.status-info {
    flex: 1;
}

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

.status-badge.active {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.canceled {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

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

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(139, 69, 19, 0.1);
}

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

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

.subscription-actions {
    text-align: center;
    margin-bottom: 32px;
}

.subscription-actions .btn {
    margin: 0 8px;
    padding: 12px 24px;
    font-size: 1.1em;
}

.btn-cancel {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-cancel:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

.btn-reactivate {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.btn-reactivate:hover {
    background: rgba(34, 197, 94, 0.2);
    transform: translateY(-2px);
}

.subscription-info {
    margin-bottom: 24px;
}

.info-box {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 20px;
}

.info-box h4 {
    color: #1e40af;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 12px;
}

.info-box p {
    color: #2c3e50;
    margin-bottom: 12px;
}

.info-box ul {
    color: #4b5563;
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.management-close {
    text-align: center;
}

.management-close .btn {
    padding: 12px 32px;
}

/* Loading state for subscription management */
.subscription-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.subscription-loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #6B4E3D;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile responsiveness for subscription management */
@media (max-width: 768px) {
    .subscription-management-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .subscription-header h2 {
        font-size: 1.8em;
    }
    
    .subscription-status {
        flex-direction: column;
        text-align: center;
    }
    
    .subscription-details {
        grid-template-columns: 1fr;
    }
    
    .subscription-actions .btn {
        display: block;
        width: 100%;
        margin: 8px 0;
    }
}

/* Label History Styles - Sprint v2.4.4 */
.label-history-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 32px;
    margin: 32px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.history-header {
    text-align: center;
    margin-bottom: 24px;
}

.history-header h2 {
    color: #2c3e50;
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 8px;
}

.history-header p {
    color: #666;
    font-size: 1.2em;
}

.history-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.plan-info {
    flex: 1;
    padding: 12px 16px;
    background: rgba(107, 78, 61, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(107, 78, 61, 0.1);
}

.plan-info.free {
    background: rgba(34, 197, 94, 0.05);
    border-color: rgba(34, 197, 94, 0.2);
}

.plan-info.premium {
    background: rgba(139, 69, 19, 0.05);
    border-color: rgba(139, 69, 19, 0.2);
}

.plan-info-text {
    font-size: 0.95em;
    color: #2c3e50;
    margin: 0;
}

.plan-info-limit {
    font-weight: 600;
    color: #6B4E3D;
}

.history-content {
    min-height: 200px;
}

.history-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.history-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(107, 78, 61, 0.2);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.history-item-title {
    flex: 1;
    margin-right: 12px;
}

.history-item-roaster {
    font-size: 0.85em;
    color: #666;
    font-weight: 500;
}

.history-item-coffee {
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
    margin: 2px 0;
}

.history-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.history-meta-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    color: white;
}

.badge-size-small { background: #10b981; }
.badge-size-medium { background: #f59e0b; }
.badge-size-large { background: #ef4444; }

.history-item-date {
    font-size: 0.8em;
    color: #888;
    margin-left: auto;
}

.history-item-details {
    margin-top: 12px;
    font-size: 0.9em;
    color: #4b5563;
}

.history-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.history-detail-label {
    font-weight: 500;
    color: #6B4E3D;
}

.history-item-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.history-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-btn-primary {
    background: #6B4E3D;
    color: white;
    border: none;
}

.history-btn-primary:hover {
    background: #5a4033;
    transform: translateY(-1px);
}

.history-btn-secondary {
    background: rgba(107, 78, 61, 0.1);
    color: #6B4E3D;
    border: 1px solid rgba(107, 78, 61, 0.2);
}

.history-btn-secondary:hover {
    background: rgba(107, 78, 61, 0.2);
}

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

.history-empty-icon {
    font-size: 3em;
    margin-bottom: 16px;
    opacity: 0.5;
}

.history-empty h3 {
    color: #2c3e50;
    font-size: 1.3em;
    margin-bottom: 8px;
}

.history-empty p {
    font-size: 1em;
    margin-bottom: 20px;
}

.upgrade-prompt {
    background: rgba(139, 69, 19, 0.05);
    border: 1px solid rgba(139, 69, 19, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.upgrade-prompt h4 {
    color: #8B4513;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.upgrade-prompt p {
    color: #666;
    margin-bottom: 16px;
}

/* Mobile responsiveness for history */
@media (max-width: 768px) {
    .label-history-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .history-header h2 {
        font-size: 1.8em;
    }
    
    .history-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .history-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .history-item {
        padding: 16px;
    }
    
    .history-item-actions {
        justify-content: stretch;
    }
    
    .history-btn {
        flex: 1;
        text-align: center;
    }
}

.app-branding {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Usage Tracking Styles - Sprint v2.4.4 */
.subscription-info-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.usage-summary {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.usage-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 80px;
}

.usage-label {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.usage-value {
    font-size: 0.9em;
    color: white;
    font-weight: 600;
}

.usage-value.usage-warning {
    color: #fbbf24;
}

.usage-value.usage-disabled {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Mobile responsiveness for usage tracking */
@media (max-width: 768px) {
    .subscription-info-container {
        padding: 8px;
    }
    
    .usage-summary {
        gap: 12px;
    }
    
    .usage-item {
        min-width: 70px;
    }
    
    .usage-label {
        font-size: 0.75em;
    }
    
    .usage-value {
        font-size: 0.85em;
    }
}

/* Feedback Button */
.footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.feedback-btn {
    background: linear-gradient(135deg, #6B4E3D, #8B4513);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 40px;
    height: 40px;
    width: auto;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(107, 78, 61, 0.2);
}

.feedback-btn-main {
    font-size: 1em;
    font-weight: 600;
}

.feedback-btn-sub {
    font-size: 0.75em;
    opacity: 0.9;
    font-weight: 400;
}

.feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 78, 61, 0.3);
}

/* Feedback Modal */
.feedback-status {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.9em;
    display: none;
}

.feedback-status.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
    display: block;
}

.feedback-status.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
    display: block;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #666;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions .btn {
    flex: 1;
}

/* Support Banner (Sprint 2.4.0) */
.support-banner {
    background: linear-gradient(135deg, #8B4513 0%, #6B4E3D 100%);
    color: white;
    padding: 15px 30px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.support-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.support-text {
    font-weight: 600;
    font-size: 1.1em;
}

.support-links {
    display: flex;
    gap: 15px;
}

.support-link {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.support-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Upgrade tooltips */
.upgrade-tooltip {
    display: block;
    margin-top: 4px;
    font-style: italic;
}

@media (max-width: 768px) {
    .support-content {
        flex-direction: column;
        text-align: center;
    }
    
    .support-banner {
        padding: 12px 20px;
    }
}