@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #22c55e;
    --primary-dark: #16a34a;
    --secondary-color: #475569;
    --accent-color: #f97316;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --border-radius: 16px;
    --box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--secondary-color);
}

/* Login sayfası */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--light-bg);
}

.login-form {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 450px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1e293b;
}

.login-form h2 span {
    color: var(--primary-color);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #475569;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: var(--transition);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.login-form button {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.login-form button:hover {
    background-color: var(--primary-dark);
}

.login-error {
    background-color: #fee2e2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.pin-display {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.pin-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #e2e8f0;
    margin: 0 10px;
    transition: var(--transition);
}

.pin-dot.filled {
    background-color: var(--primary-color);
}

.pin-button {
    background-color: var(--white);
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.pin-button:hover {
    background-color: #f1f5f9;
}

.pin-button.clear {
    background-color: #fee2e2;
    color: #b91c1c;
}

.pin-button.clear:hover {
    background-color: #fecaca;
}

.pin-button.enter {
    background-color: #dcfce7;
    color: var(--primary-color);
    grid-column: span 1;
}

.pin-button.enter:hover {
    background-color: #bbf7d0;
}

.pin-backspace {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin-backspace svg {
    width: 24px;
    height: 24px;
}

/* Admin panel */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background-color: var(--white);
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.logo {
    padding: 25px 20px;
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

.logo span {
    color: var(--primary-color);
}

.menu {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #64748b;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
    margin-bottom: 5px;
}

.menu a svg {
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

.menu a:hover {
    color: var(--primary-color);
    background-color: #f8fafc;
}

.menu a.active {
    color: var(--primary-color);
    background-color: #f0fdf4;
    border-right: 3px solid var(--primary-color);
}

.menu a.logout {
    margin-top: auto;
    color: #ef4444;
}

.menu a.logout:hover {
    color: #b91c1c;
    background-color: #fee2e2;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    font-weight: 500;
    color: #1e293b;
}

.user-role {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 20px;
    background-color: #f1f5f9;
    color: #64748b;
}

.user-role.admin {
    background-color: #f0fdf4;
    color: var(--primary-color);
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 25px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.btn svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: #64748b;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

.btn-danger {
    background-color: #fee2e2;
    color: #ef4444;
}

.btn-danger:hover {
    background-color: #fecaca;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

table th {
    font-weight: 600;
    color: #1e293b;
    background-color: #f8fafc;
}

table tbody tr:hover {
    background-color: #f8fafc;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background-color: #dcfce7;
    color: var(--primary-color);
}

.status-inactive {
    background-color: #fee2e2;
    color: #ef4444;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

.action-btn.edit {
    color: #3b82f6;
}

.action-btn.edit:hover {
    background-color: #eff6ff;
}

.action-btn.delete {
    color: #ef4444;
}

.action-btn.delete:hover {
    background-color: #fee2e2;
}

.form-row {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #475569;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.stat-card-title {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card-value {
    color: #1e293b;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-bottom: 15px;
}

.stat-card-icon svg {
    width: 24px;
    height: 24px;
}

.stat-card-icon.green {
    background-color: #dcfce7;
    color: var(--primary-color);
}

.stat-card-icon.blue {
    background-color: #dbeafe;
    color: #3b82f6;
}

.stat-card-icon.orange {
    background-color: #ffedd5;
    color: #f97316;
}

.stat-card-icon.red {
    background-color: #fee2e2;
    color: #ef4444;
}

.stat-card-change {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.stat-card-change.up {
    color: var(--primary-color);
}

.stat-card-change.down {
    color: #ef4444;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background-color: #dcfce7;
    color: var(--primary-color);
}

.alert-error {
    background-color: #fee2e2;
    color: #ef4444;
}

.alert-info {
    background-color: #dbeafe;
    color: #3b82f6;
}

.alert-warning {
    background-color: #ffedd5;
    color: #f97316;
}

/* Satış sayfası tasarımı */
.pos-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.pos-header {
    background-color: var(--white);
    color: var(--secondary-color);
    padding: 20px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: relative;
    z-index: 10;
}

.pos-header span {
    color: var(--primary-color);
}

.pos-main {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding: 20px;
    gap: 20px;
}

.pos-categories {
    display: flex;
    overflow-x: auto;
    background-color: var(--white);
    padding: 15px;
    gap: 10px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.pos-category {
    padding: 10px 20px;
    background-color: #f8fafc;
    border-radius: 50px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
    transition: var(--transition);
}

.pos-category.active {
    background-color: var(--primary-color);
    color: white;
}

.pos-products {
    width: 60%;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding-right: 10px;
}

.pos-product {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    height: 220px;
    display: flex;
    flex-direction: column;
}

.pos-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.pos-product-image {
    height: 130px;
    background-size: cover;
    background-position: center;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.pos-product-info {
    padding: 15px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pos-product-name {
    font-weight: 600;
    font-size: 16px;
    color: #1e293b;
}

.pos-product-price {
    color: var(--primary-color);
    margin-top: 5px;
    font-weight: 500;
    font-size: 15px;
}

.pos-cart {
    width: 40%;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pos-cart-header {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 18px;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.pos-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.pos-cart-empty {
    text-align: center;
    padding: 40px 0;
    color: #94a3b8;
    font-size: 16px;
}

.pos-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f8fafc;
    border-radius: 12px;
    transition: var(--transition);
}

.pos-cart-item:hover {
    background-color: #f1f5f9;
}

.pos-cart-item-details {
    display: flex;
    flex-direction: column;
}

.pos-cart-item-name {
    font-weight: 600;
    color: #1e293b;
}

.pos-cart-item-quantity {
    color: #64748b;
    font-size: 14px;
    margin-top: 4px;
}

.pos-cart-item-price {
    font-weight: 600;
    color: var(--primary-color);
}

.pos-cart-item-delete {
    color: #ef4444;
    cursor: pointer;
    transition: var(--transition);
}

.pos-cart-item-delete:hover {
    transform: scale(1.1);
}

.pos-cart-total {
    background-color: #f8fafc;
    padding: 20px;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    border-top: 1px solid #e2e8f0;
    text-align: right;
}

.pos-cart-actions {
    padding: 20px;
    display: flex;
    gap: 15px;
}

.pos-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.pos-modal-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    animation: modalAppear 0.3s;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pos-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pos-modal-header h2 {
    margin: 0;
    font-size: 22px;
    color: #1e293b;
    font-weight: 600;
}

.pos-close-modal {
    font-size: 28px;
    cursor: pointer;
    color: #64748b;
    transition: var(--transition);
}

.pos-quantity-selector {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.pos-quantity-type {
    display: flex;
    gap: 15px;
}

.pos-quantity-type button {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    background-color: white;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition);
    color: #64748b;
}

.pos-quantity-type button:hover {
    border-color: #cbd5e1;
}

.pos-quantity-type button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pos-quantity-input {
    display: flex;
    align-items: center;
    position: relative;
}

.pos-quantity-input input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 20px;
    text-align: center;
    outline: none;
    transition: var(--transition);
}

.pos-keyboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.pos-key {
    padding: 15px 10px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    font-size: 20px;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
    color: #1e293b;
}

.pos-key:hover {
    background-color: #f1f5f9;
}

.pos-key:active {
    background-color: #e2e8f0;
    transform: scale(0.98);
}

.pos-key.backspace {
    grid-column: span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.pos-add-to-cart-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.pos-add-to-cart-btn:hover {
    background-color: var(--primary-dark);
}

.pos-payment-modal-content {
    max-width: 600px;
}

.pos-payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.pos-payment-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.pos-payment-method:hover {
    border-color: #cbd5e1;
}

.pos-payment-method.active {
    border-color: var(--primary-color);
    background-color: #f0fdf4;
}

.pos-payment-method-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    color: #64748b;
}

.pos-payment-method.active .pos-payment-method-icon {
    color: var(--primary-color);
}

.pos-payment-method-name {
    font-weight: 500;
    color: #1e293b;
}

.pos-payment-summary {
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.pos-payment-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.pos-payment-row.total {
    font-weight: 600;
    font-size: 18px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    margin-top: 10px;
}

.pos-payment-actions {
    display: flex;
    gap: 15px;
}

/* Responsive */
@media screen and (max-width: 1024px) {
    .pos-main {
        flex-direction: column;
    }
    
    .pos-products, .pos-cart {
        width: 100%;
    }
    
    .pos-products {
        height: 50vh;
    }
    
    .sidebar {
        width: 240px;
    }
}

@media screen and (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .menu {
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
    }
    
    .menu a {
        margin-bottom: 0;
        margin-right: 5px;
        white-space: nowrap;
    }
    
    .menu a svg {
        margin-right: 5px;
    }
    
    .logo {
        padding: 15px;
        font-size: 20px;
    }
    
    .pos-products {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .pos-product {
        height: 200px;
    }
    
    .pos-product-image {
        height: 110px;
    }
}

@media screen and (max-width: 480px) {
    .main-content {
        padding: 15px;
    }
    
    .card {
        padding: 15px;
    }
    
    .pos-main {
        padding: 10px;
        gap: 10px;
    }
    
    .pos-header {
        padding: 15px;
        font-size: 20px;
    }
    
    .pos-products {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    
    .pos-product {
        height: 180px;
    }
    
    .pos-product-image {
        height: 100px;
    }
    
    .pos-product-name {
        font-size: 14px;
    }
    
    .pos-modal-content {
        padding: 20px;
    }
    
    .stat-card-value {
        font-size: 20px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
}