/*========================================
  Reset & Base Styles
========================================*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    font-size: 16px;
}

body {
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/*========================================
  Site Logo
========================================*/
.site-logo {
    text-align: center;
    margin: 2rem 0;
}

.site-logo img {
    width: auto;
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
}

/*========================================
  Buttons
========================================*/
button,
.btn,
.lang-btn {
    background-color: #1976d2;
    color: #fff;
    border: none;
    padding: 0.65rem 1.3rem;
    margin: 0.3rem;
    border-radius: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.18);
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

button:hover,
.btn:hover,
.logout-btn:hover,
.lang-btn:hover {
    background-color: #0d61b5;
    box-shadow: 0 4px 10px rgba(0,0,0,0.22);
}

.btn.primary { background-color: #1976d2; }
.btn.secondary { background-color: #6c757d; }
.btn.danger { background-color: #d32f2f; }

.btn.small {
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
}

/*========================================
  Language & Logout Buttons
========================================*/
.lang-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    z-index: 200;
}

.logout-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    z-index: 200;
}

/*========================================
  Boxes
========================================*/
.box {
    background: linear-gradient(180deg, #ffffff, #f9fafb);
    max-width: 500px;
    width: 90%;
    margin: 3rem auto;
    padding: 2rem 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    text-align: center;
}

.box h1,
.box h2 {
    margin-bottom: 1.5rem;
    color: #0077b6;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/*========================================
  Form Styling
========================================*/
.box form,
.form-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.box input,
.box textarea,
.form-container input,
.form-container textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 0.6rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.box input:focus,
.box textarea:focus,
.form-container input:focus,
.form-container textarea:focus {
    border-color: #1976d2;
    box-shadow: 0 0 5px rgba(25,118,210,0.3);
}

.box input::placeholder,
.form-container input::placeholder,
.form-container textarea::placeholder {
    color: #999;
    font-style: italic;
}

/*========================================
  Info & Messages
========================================*/
.box p {
    text-align: left;
    margin: 0.6rem 0;
    font-size: 1rem;
    line-height: 1.5;
}

.box .success {
    color: #2d6a4f;
    font-weight: 600;
    padding: 0.5rem 0.8rem;
    border-radius: 0.4rem;
    text-shadow: 1px 1px 2px rgba(45,106,79,0.3);
}

.box .error {
    color: #d00000;
    font-weight: 600;
    padding: 0.5rem 0.8rem;
    border-radius: 0.4rem;
    text-shadow: 1px 1px 2px rgba(208,0,0,0.3);
}

/*========================================
  Card Actions
========================================*/
.card-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-actions .btn {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    padding: 0.45rem 0.8rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.card-actions .btn:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
}

.card-actions .btn.small.danger {
    background-color: #fdecea;
    color: #b71c1c;
    border-color: #f5c6cb;
}

.card-actions .btn.small.danger:hover {
    background-color: #f8d7da;
    border-color: #f1aeb5;
}

/*========================================
  Operations Table
========================================*/
.operations-panel {
    margin: 2rem auto;
    padding: 1rem;
    max-width: 95%;
    background: #fff;
    border-radius: 0.8rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow-x: auto;
}

.operations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 600px;
}

.operations-table th,
.operations-table td {
    border: 1px solid #ccc;
    padding: 0.5rem;
    text-align: center;
}

.operations-table th {
    background-color: #e3f2fd;
    font-weight: 600;
}

/*========================================
  Flash Message
========================================*/
.flash {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 1000;
}

/*========================================
  Hamburger Menu
========================================*/
/* Hamburger Menu */
.menu-wrapper {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 100;
}

.hamburger {
    width: 40px;
    height: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    padding: 6px;
}

.hamburger span {
    height: 4px;
    width: 100%;
    background: #1976d2;
    border-radius: 4px;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.menu-items {
    display: none;
    position: absolute;
    top: 50px;
    left: 0;
    background: #ffffff;
    padding: 0.8rem;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    min-width: 180px;

    /* Animation */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.menu-items.open {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/*============================
   Dropdown Links
=============================*/
.menu-items a {
    display: block;
    margin: 0.5rem 0;
    padding: 0.6rem;
    background: #f5f7fa;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.25s ease, transform 0.15s ease;
}

/* Hover effect */
.menu-items a:hover {
    background: #e3f2fd;
    transform: translateX(4px);
}

/* Special buttons already defined (primary / danger) override background if needed */
.menu-items a.primary {
    background: #2196F3;
    color: white;
}

.menu-items a.primary:hover {
    background: #1976D2;
}

.menu-items a.danger {
    background: #ef5350;
    color: white;
}

.menu-items a.danger:hover {
    background: #d32f2f;
}

/*========================================
  All Clients Page Styles
========================================*/
.clients-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.client-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-left: 4px solid #1976d2;
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.client-header h3 {
    color: #1976d2;
    margin: 0;
}

.client-id {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.client-info {
    margin-bottom: 1rem;
}

.client-info p {
    margin: 0.3rem 0;
    font-size: 0.95rem;
}

.client-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.operations-section {
    margin-top: 1rem;
}

.operations-section h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.operations-table-container {
    overflow-x: auto;
}

.operations-table.compact {
    font-size: 0.85rem;
    min-width: 800px;
}

.operations-table.compact th,
.operations-table.compact td {
    padding: 0.4rem 0.6rem;
}

.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-done {
    background: #e8f5e8;
    color: #2d6a4f;
}

.status-pending {
    background: #fff3e0;
    color: #e65100;
}

.operation-actions {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
}

.no-operations {
    text-align: center;
    padding: 1rem;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 0.5rem;
}

/* Responsive for all clients page */
@media (max-width: 768px) {
    .client-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .client-actions {
        justify-content: center;
    }
    
    .client-actions .btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}

/*========================================
  Responsive
========================================*/
@media (max-width: 1024px) {
    .box {
        width: 90%;
        padding: 1.8rem;
    }
    .operations-table {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .box {
        width: 95%;
        padding: 1.5rem;
    }

    .operations-table {
        font-size: 0.85rem;
    }

    .site-logo img {
        max-width: 130px;
    }
}

@media (max-width: 480px) {
    .box {
        width: 95%;
        padding: 1rem;
    }

    .operations-table {
        font-size: 0.8rem;
    }

    .site-logo img {
        max-width: 120px;
    }

    .menu-items {
        min-width: 140px;
        padding: 0.5rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
