/* Global Styles */
body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #0d0d0d;
    color: #ffffff;
    margin: 0;
    padding: 40px 20px;
}

.container {
    max-width: 650px;
    margin: 0 auto;
    background: #1a1a1a;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #333;
    box-sizing: border-box;
}

h2 {
    margin: 0;
    font-weight: 600;
    font-size: 28px;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #39FF14;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-top: 5px;
    margin-bottom: 30px;
    display: block;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    background: #121212;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border 0.2s;
    margin-bottom: 15px;
}

input:focus {
    outline: none;
    border-color: #39FF14;
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    font-size: 15px;
    transition: all 0.2s;
    text-align: center;
    display: inline-block;
    text-decoration: none;
    box-sizing: border-box;
}

.btn-primary {
    background: #39FF14;
    color: #000;
}

.btn-primary:hover {
    background: #2fe010;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid #555;
}

.btn-outline:hover {
    border-color: #fff;
}

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

.login-container {
    max-width: 320px;
    width: 100%;
    text-align: center;
    padding: 35px 20px;
    border-radius: 10px;
}

.login-container h2 {
    font-size: 22px;
}

.login-container .subtitle {
    margin-bottom: 25px;
}

.logo-img {
    max-width: 95px;
    margin-bottom: 15px;
    height: auto;
    filter: brightness(0) invert(1);
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 45px;
    margin-bottom: 20px;
}

.toggle-btn {
    position: absolute;
    right: 12px;
    top: 22px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s;
}

.toggle-btn:hover {
    color: #39FF14;
}

.error-msg {
    color: #ff3b30;
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
}

/* Dashboard Specific Styles */
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.btn-logout {
    font-size: 12px;
    color: #888;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
}

.btn-logout:hover {
    color: #fff;
    border-color: #fff;
}

.instructions {
    background: #222;
    border-left: 4px solid #39FF14;
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 4px;
    font-size: 13px;
    color: #ccc;
    line-height: 1.5;
}

.instructions strong {
    color: #fff;
}

.section-title {
    font-size: 12px;
    color: #888;
    margin-top: 30px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
}

.card {
    background: #262626;
    border: 1px solid #333;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

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

.card-header strong {
    color: #fff;
    font-size: 15px;
}

.badge {
    background: #333;
    color: #39FF14;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    margin-left: 10px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-action {
    text-decoration: none;
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-qr {
    background: #333;
    color: #fff;
    border: 1px solid #555;
}

.btn-qr:hover {
    background: #444;
    border-color: #39FF14;
    color: #39FF14;
}

.btn-delete {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.3);
    line-height: 1.2;
}

.btn-delete:hover {
    background: #ff3b30;
    color: #fff;
}

.add-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 15px;
    margin-bottom: 15px;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 320px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #fff;
}

/* Media Queries */
@media (max-width: 480px) {
    .add-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .action-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .btn-action {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 360px) {
    .login-container {
        padding: 25px 15px;
    }

    .login-container h2 {
        font-size: 20px;
    }
}