/* H&T KINGDOM OF DRACHMAS - Main Stylesheet */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #f39c12;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-bg: #ecf0f1;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #bdc3c7;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    flex: 1;
}

.logo span {
    color: var(--accent-color);
}

.currency-symbol {
    font-family: 'Times New Roman', serif;
    font-size: 2.2rem;
    color: var(--accent-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info small {
    color: var(--text-light);
}

.logout-btn {
    background: var(--danger-color);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.logout-btn:hover {
    opacity: 0.9;
}

/* Main Content */
main {
    padding-top: 80px;
    min-height: calc(100vh - 80px);
}

/* Login Section */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
}

.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background: var(--secondary-color);
}

.btn-secondary {
    background: var(--text-light);
}

.btn-success {
    background: var(--success-color);
}

.btn-danger {
    background: var(--danger-color);
}

.btn-warning {
    background: var(--warning-color);
}

/* Dashboard */
.dashboard {
    padding: 20px 0;
}

.balance-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    margin-bottom: 30px;
}

.balance-card h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.balance-amount {
    font-size: 3rem;
    font-weight: bold;
    color: var(--success-color);
    margin: 20px 0;
}

.balance-amount .currency {
    font-family: 'Times New Roman', serif;
    color: var(--accent-color);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.action-btn {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.action-btn.admin-btn {
    background: var(--accent-color);
}

/* Transactions */
.transactions-section {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-top: 20px;
}

.transactions-section h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.transaction-table {
    width: 100%;
    border-collapse: collapse;
}

.transaction-table th,
.transaction-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.transaction-table th {
    background: var(--light-bg);
    font-weight: 600;
}

.transaction-table tr:hover {
    background: var(--light-bg);
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    color: var(--primary-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

/* Receipt */
.receipt {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 2px dashed var(--border-color);
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

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

.receipt-total {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-top: 15px;
}

/* Admin Panel */
.admin-panel {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-top: 20px;
}

.admin-panel h3 {
    margin-bottom: 20px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-tab {
    padding: 10px 20px;
    background: var(--light-bg);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.admin-tab.active {
    background: var(--accent-color);
    color: var(--white);
}

.admin-content {
    display: none;
}

.admin-content.active {
    display: block;
}

/* User List */
.user-list {
    display: grid;
    gap: 15px;
}

.user-card {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.user-info-display {
    flex: 1;
    min-width: 250px;
}

.user-info-display h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.user-info-display p {
    color: var(--text-light);
    font-size: 0.9rem;
}

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

.user-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-deposit {
    background: var(--success-color);
    color: var(--white);
}

.btn-penalize {
    background: var(--warning-color);
    color: var(--white);
}

.btn-freeze {
    background: var(--danger-color);
    color: var(--white);
}

.btn-delete {
    background: var(--text-dark);
    color: var(--white);
}

.btn-promote {
    background: var(--accent-color);
    color: var(--white);
}

/* Status Badges */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-frozen {
    background: #f8d7da;
    color: #721c24;
}

.status-penalized {
    background: #fff3cd;
    color: #856404;
}

.role-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    margin-left: 10px;
}

/* Alert Messages */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

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

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Profile Section */
.profile-section {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-top: 20px;
}

.profile-section h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.profile-details {
    display: grid;
    gap: 15px;
}

.profile-detail {
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
}

.profile-detail strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        font-size: 1.2rem;
    }
    
    .currency-symbol {
        font-size: 1.5rem;
    }
    
    .user-info {
        font-size: 0.9rem;
    }
    
    .login-card {
        padding: 25px;
    }
    
    .balance-amount {
        font-size: 2.2rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .transaction-table {
        font-size: 0.9rem;
    }
    
    .user-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-actions {
        width: 100%;
    }
    
    .user-actions button {
        flex: 1;
        min-width: 80px;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .modal-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    main {
        padding-top: 100px;
    }
    
    .balance-amount {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 10px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Print Styles for Receipts */
@media print {
    body * {
        visibility: hidden;
    }
    
    .receipt,
    .receipt * {
        visibility: visible;
    }
    
    .receipt {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: 2px solid var(--primary-color);
    }
}

/* Utility Classes */
.hidden {
    display: none;
}

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

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Store Discount Section */
.store-calculation {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.store-calculation h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.discount-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    padding: 10px;
    background: var(--white);
    border-radius: 5px;
}

.discount-display.original {
    color: var(--text-light);
}

.discount-display.discount {
    color: var(--success-color);
}

.discount-display.final {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 15px;
}

/* Profile Photo */
.profile-photo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--white);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin-bottom: 15px;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-upload-btn {
    font-size: 0.9rem;
    padding: 8px 15px;
}

/* Form Inline Styles */
.inline-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.inline-form input[type="text"] {
    flex: 1;
    min-width: 200px;
}

.inline-form button {
    padding: 8px 15px;
    font-size: 0.9rem;
}