/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styling */
.main-header {
    background-color: #1a73e8; /* Google Blue style */
    color: white;
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.logout-btn {
    background-color: #d93025;
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.logout-btn:hover {
    background-color: #b21f16;
}

/* Layout Structure */
.content-area {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: 240px;
    background-color: #ffffff;
    padding: 20px 10px;
    border-right: 1px solid #ddd;
}

.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: 5px;
}

.nav-links a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #5f6368;
    border-radius: 0 25px 25px 0;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    background-color: #e8f0fe;
    color: #1a73e8;
}

/* Email List Area */
.email-list-container {
    flex: 1;
    background-color: white;
    margin: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow-y: auto;
    padding: 0;
}

.list-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: #fafafa;
}

.email-row {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    transition: background 0.1s, box-shadow 0.1s;
}

.email-row:hover {
    background-color: #f8f9fa;
    box-shadow: inset 1px 0 0 #1a73e8;
}

.sender {
    width: 25%;
    font-weight: 600;
    color: #202124;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subject {
    width: 55%;
    color: #5f6368;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 20px;
}

.date {
    width: 20%;
    text-align: right;
    font-size: 0.85rem;
    color: #70757a;
}

/* Status Messages */
.info-box, .error-box {
    padding: 40px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.error-box {
    color: #d93025;
}

/* Footer Styling */
.main-footer {
    background-color: #f8f9fa;
    color: #70757a;
    text-align: center;
    padding: 10px;
    font-size: 0.8rem;
    border-top: 1px solid #ddd;
}

/* Responsive Fix */
@media (max-width: 768px) {
    .sidebar { width: 80px; }
    .sidebar span, .nav-links a { font-size: 0; text-align: center; }
    .sender { width: 40%; }
    .subject { width: 40%; }
    .date { width: 20%; }
}





/* Auth Body Reset */
body.auth-body {
    background-color: #f7f9fc;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Roboto', Arial, sans-serif;
}

/* Central Card */
.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #1a73e8;
    font-size: 24px;
    margin-bottom: 10px;
}

.login-header h2 {
    font-size: 22px;
    font-weight: 400;
}

/* Input Fields Logic */
.input-container {
    margin-bottom: 20px;
    width: 100%;
}

/* Target all text and password inputs */
input[type="text"], 
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
    transition: border 0.2s;
}

input:focus {
    border: 2px solid #1a73e8;
    padding: 12px 14px; /* Adjustment for 2px border */
}

/* Special Username Field with Domain */
.username-field {
    display: flex;
    align-items: center;
    border: 1px solid #dadce0;
    border-radius: 4px;
    background: #fff;
}

.username-field:focus-within {
    border: 2px solid #1a73e8;
}

.username-field input {
    border: none !important;
    flex: 1;
}

.at-domain {
    padding-right: 15px;
    color: #70757a;
    font-size: 14px;
    user-select: none;
}

/* Alert Boxes */
.alert-box {
    color: #d93025;
    background: #fce8e6;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid #f5c2c7;
}

.success-box {
    color: #0f5132;
    background: #d1e7dd;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid #badbcc;
}

/* Buttons and Links */
.login-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.next-btn {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}

.create-link {
    text-decoration: none;
    color: #1a73e8;
    font-size: 14px;
    font-weight: 500;
}

.sub-footer {
    margin-top: 20px;
    color: #70757a;
    font-size: 12px;
}